如何在Visual Studio Code中添加依赖项javadocs?

如何在Visual Studio Code中添加依赖项javadocs?

问题描述:

我已经在Visual Studio代码中建立了带有Red Hat Java支持的Maven项目.一切工作都很好,除了intellisense不包含我依赖项中的函数和类的javadoc描述.有没有一种方法可以将VSCode显式链接到我的库的jdocs?如果是这样,我该怎么办?

I've set up a maven project in visual studio code with the red hat java support. Everything works great, except that the intellisense doesn't include the javadoc descriptions for the functions and classes from my dependency. Is there a way to explicitly link VSCode to my library's jdocs? If so, how do I do it?

您可以尝试以下方法:

例如,我有一个项目:

/project
 /lib
  test-1.0.0.jar
 /doc
  test-1.0.0-javadoc.jar

添加您的.classPath:

<classpathentry kind="lib" path="lib/test-1.0.0.jar">
  <attributes>
    <attribute name="javadoc_location" value="jar:platform:/resource/project/doc/test-1.0.0-javadoc.jar!/" />
  </attributes>
</classpathentry>