Reputation: 1689
I currently use the JSoup dependency into Visual Studio Code, but I don't have the Javadoc or the source code of Jsoup in my Visual Studio Code:
<dependency>
<!-- jsoup HTML parser library @ https://jsoup.org/ -->
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.13.1</version>
</dependency>
The javadoc is not shown
The source is not shown
Do you have any idea to solve this problem?
The JavaDoc
and Sources
of JSoup dependency are available here: https://repo1.maven.org/maven2/org/jsoup/jsoup/1.13.1/
JSoup included the Javadoc in their code: https://github.com/jhy/jsoup/blob/master/src/main/java/org/jsoup/nodes/Document.java
Upvotes: 5
Views: 2879
Reputation: 763
In VS Code v1.68.1 my javadocs
for some reason stopped showing up and navigating to definition showed the disassembled sources instead of the packaged sources. Enabling the settings depicted below restored the javadocs
and sources
I was expecting.
Setting IDs
java.eclipse.downloadSources
java.maven.downloadSources
Upvotes: 2
Reputation: 7798
Do this:
<dependency>
<!-- jsoup HTML parser library @ https://jsoup.org/ -->
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.13.1</version>
</dependency>
<dependency>
<!-- jsoup HTML parser library @ https://jsoup.org/ -->
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.13.1</version>
<classifier>sources</classifier>
</dependency>
<dependency>
<!-- jsoup HTML parser library @ https://jsoup.org/ -->
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.13.1</version>
<classifier>javadoc</classifier>
</dependency>
Upvotes: 3
Reputation: 9511
There's no way to achieve your goals because the jar or dependency itself doesn't have the docstring.
For example, when you click into println
, the comment part is also the content when you hover over the println
:
But there's no such comment in jsoup, so java extension won't be able to catch the docstring and show it.
[UPDATE]
jsoup/src/main/java/org/jsoup/nodes/Document.class:
The files included in jar are all compiled to .class file, there's no comments before functions, so Java language server can't catch it to show as the feature intellisense.
Upvotes: -1