有沒有辦法使用指向它的鏈接在 vscode 中附加外部 javadoc?例如,intellij idea 允許您這樣做。
uj5u.com熱心網友回復:
如果您的 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>
uj5u.com熱心網友回復:
您可以嘗試以下方法:
例如,我有一個專案:
/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>
uj5u.com熱心網友回復:
庫、源代碼和 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]
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/449190.html
