如何在 SpringSource Tool Suite 中将 javadoc 链接到 grails?

发布于 2024-12-26 10:40:13 字数 117 浏览 6 评论 0原文

如何将 grails 或 groovy 的 javadoc 链接到 SpringSource Tool Suite。我希望当我将鼠标悬停在某些内容上时,会出现相关的 javadoc。我已经搜索了一段时间但找不到任何东西。

How do I link the javadocs for grails or groovy to SpringSource Tool Suite. I want the relevant javadocs to appear when I hover over things. I've been searching for a while but can't find anything.

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

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

发布评论

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

评论(1

泛泛之交 2025-01-02 10:40:13

这在 Groovy-Eclipse 中可用并且应该可以正常工作。试试这个:

  1. 创建一个空的groovy脚本
  2. 添加此文本:

    <前><代码>/**
    * 一些javadoc
    * @返回一些东西
    */
    def 方法() { }
    方法()

  3. 现在,将鼠标悬停在方法引用或声明上。

  4. 您应该看到格式良好的 javadoc。

您可能无法在 grails 元素上看到 javadoc。这应该也能工作,但可能有点挑剔。为了使 javadoc 工作,Grails 工具必须能够下载您引用的任何库的源代码。大多数时候,这种情况就会发生。但有时,你需要强迫它。您可以通过选择 Grails 项目并右键单击来完成此操作(参见下图)。

download source

当然,这有助于确保您安装了最新的 Groovy-Eclipse 和 Grails-tooling (2.6.0和 2.8.1)。

This is available in Groovy-Eclipse and should just be working. Try this:

  1. create an empty groovy script
  2. add this text:

    /**
     * some javadoc
     * @return Something
     */
    def method() { }
    method()
    
  3. now, hover over the method reference or declaration.

  4. You should see nicely formatted javadoc.

It may be the case that you are failing to see javadoc on grails elements. This should be working too, but can be a little more finicky. In order for javadoc to work, the Grails tooling must be able to download the source of whatever library you are referencing. Most of the time, this just happens. But sometimes, you need to force it. You can do this by selecting your Grails project, and right-clicking (see image below).

download source

Of course, it helps to make sure you have the latest Groovy-Eclipse and Grails-tooling installed (2.6.0 and 2.8.1 respectively).

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