有没有一种方法可以使用链接将外部javadoc附加到vscode中?例如,intellij允许您这样做。
发布于 2022-03-22 09:13:58
库、源和javadoc位置
Classpath.fileReference(Object) 20方法被添加到公共API中,以便能够为类路径条目设置自定义源和javadoc位置。
import org.gradle.plugins.ide.eclipse.model.Library
apply plugin: 'java'
apply plugin: 'eclipse'
eclipse {
classpath {
file {
whenMerged {
def lib = entries.find { it.path.contains 'my-commercial-lib.jar'
}
lib.javadocPath = fileReference(file('libs/my-commercial-lib-javadoc.jar'))
lib.sourcePath = fileReference(file('libs/m-commercial-lib-source.jar'))
}
}
}
[details=Configured entry in classpath container]
[/details]
发布于 2022-03-22 06:40:33
如果Javadoc .jar
文件位于项目目录中,则可以将其添加到类路径中。只要重新命名一切,以满足你的需要。
<classpathentry kind="lib" path="lib/avro-1.8.2.jar">
<attributes>
<attribute name="javadoc_location" value="jar:platform:/resources/project/doc/avro-1.8.2-javadoc.jar!/" />
</attributes>
</classpathentry>
发布于 2022-03-22 09:11:56
您可以尝试以下方法:
例如,我有一个项目:
/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>
https://stackoverflow.com/questions/71567773
复制相似问题