A similar question was asked for Eclipse: Add Java Docs in Eclipse working on OpenJDK
I found /usr/lib/jvm/java-11-openjdk-amd64/lib/src.zip on my system.
Building and runing a source file works. Documentation is shown for dependencies loaded via Maven. The documentation for the Java standard library is missing.
Examples:
hovering over
System.out.println("test");
shows
void java.io.PrintStream.println(String x)
I would like to see the javadoc here.
It is working with:
new DefaultCamelContext();
It shows:
org.apache.camel.impl.DefaultCamelContext.DefaultCamelContext()
Creates the ModelCamelContext using org.apache.camel.support.DefaultRegistry as registry.
Use one of the other constructors to force use an explicit registry.
Edit: Relevant Installed Visual Studio Code Extensions are:
- Language Support for Java(TM) by Red Hat
- Debugger for Java
- Java Test Runner
- Maven for Java
- Project Manager for Java
- Visual Studio IntelliCode
These are installed via the official Java Extension Pack from Microsoft.
edit2: my user settings.json
{
"telemetry.enableTelemetry": false,
"telemetry.enableCrashReporter": false,
"editor.fontFamily": "'Ubuntu Mono', 'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'",
"files.autoSave": "onFocusChange",
"window.zoomLevel": 3,
"editor.wordWrap": "bounded",
"yaml.schemas": {
"file:///toc.schema.json": "/toc\\.yml/i"
},
"window.menuBarVisibility": "default",
"rust-analyzer.checkOnSave.command": "clippy",
"editor.minimap.enabled": false,
"editor.cursorBlinking": "solid",
"rust-analyzer.checkOnSave.enable": false,
"explorer.sortOrder": "mixed",
"rust-analyzer.lens.methodReferences": true,
"rust-analyzer.lens.references": true,
"rust-analyzer.lruCapacity": 512,
"workbench.colorTheme": "Default Dark+",
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"files.exclude": {
"**/.classpath": true,
"**/.project": true,
"**/.settings": true,
"**/.factorypath": true
},
"java.home": "/usr/lib/jvm/java-11-openjdk-amd64",
"java.configuration.runtimes": [
{
"name": "JavaSE-11",
"path": "/usr/lib/jvm/java-11-openjdk-amd64",
"default": true
}
]
}
my workspace settings.json is empty