vscode-java icon indicating copy to clipboard operation
vscode-java copied to clipboard

Feature suggestion: Add Javadoc for 'ClassName'

Open doggy8088 opened this issue 3 years ago • 1 comments

Add Javadoc for 'Class'

Environment
  • Operating System: Windows 10
  • JDK version: 17.0.2
  • Visual Studio Code version: 1.69.2
  • Java extension version: v1.9.0
Steps To Reproduce
  1. Add a class
  2. cursor move to class name
  3. Hit Ctrl+. (Show Code Actions)
  4. I can't find a command called Add Javadoc for 'ClassName'
Current Result

There is already a Add Javadoc for 'MethodName' command.

image

Expected Result

I expected there is a Add Javadoc for 'ClassName' command.

Additional Informations

N/A

doggy8088 avatar Jul 31 '22 15:07 doggy8088

We already support adding Javadoc for methods and classes. Given the example with Lib1 from above, is the request to have Add Javadoc for Lib1 as an option when the code action is activated from the Hello method ?

Also note that one can also configure missing javadocs to be an error or warning. Relative to the root of your project :

.vscode/settings.json

{
	"java.settings.url": "settings.prefs"
}

settings.prefs

org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning

Some of these settings can be found at https://github.com/redhat-developer/vscode-java/wiki/Settings-Global-Preferences#java-compiler-options .

rgrunber avatar Aug 24 '22 00:08 rgrunber