将外部 javadoc 添加到 vscode

发布于 2025-01-15 22:39:59 字数 65 浏览 3 评论 0原文

有没有办法使用链接在 vscode 中附加外部 javadoc?例如,intellij idea 允许您执行此操作。

Is there a way to attach an external javadoc in vscode using a link to it? For example, intellij idea allows you to do this.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

牛↙奶布丁 2025-01-22 22:39:59

库、源代码和 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]

Library, source and javadoc location

The Classpath.fileReference(Object) 20 method was added to the public API to be able to set custom source and javadoc location for a classpath entry.

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]
来世叙缘 2025-01-22 22:39:59

如果您的 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>

If your Javadoc .jar file is inside your project directory you can add this to your classpath. Just rename everything to fit your needs.

<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>
南笙 2025-01-22 22:39:59

你可以尝试以下方法:


比如我有一个项目:

/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>

You can try the following methods:


For example, I have a project:

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

Add your .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>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文