As described in the title. We were currently using JSFML and Swing to develop a project, where I would like to view the Javadoc of JSFML in VSCode. However, when I tried to hover to show Javadoc it doesn't but throws me only a simple line.
For example: I built a renderWindow
by using one of JSFML's package, graphic (with class RenderWindow
), and try to hover. It shows me this:
org.jsfml.graphics.RenderWindow.RenderWindow(VideoMode arg0, String arg1)
Instead of Javadoc of it. When I went into the definition, instead of Javadoc I saw such a comment at the head of its class file:
// Failed to get sources. Instead, stub sources have been generated by the disassembler.
// Implementation of methods is unavailable.
How can I see the Javadoc of it in VSCode? Or I actually was not allowed to since it's restricted(?)
Link for JSFML here if it helps:
Molly's answer explains why the javadoc is not available for your JAR.
If JSFML or any other Java dependency you use has a source jar, VS Code can use it so you can see the source and its Javadoc just like the JDK. The steps to get it visible in VS Code are:
org.jsfml.graphics.RenderWindow.RenderWindow
)Failed to get sources. Instead, stub sources have been generated by the disassembler...
, right/alt click to open the context menu and select Attach Source.Attach Source in context menu
Select source jar
This solution was originally proposed in https://github.com/redhat-developer/vscode-java/issues/1855#issuecomment-823142835 on a similar issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With