Grails 开发:eclipse 与 intellij idea

发布于 2024-09-29 13:59:03 字数 339 浏览 1 评论 0原文

我下载了 sts 并安装了 grails/groovy 插件,这很好,但我无法使用 JavaScript 功能,例如在 JavaScript 编辑器中跳转类和函数。

当我单击 command 和函数名称时,我会看到一个对话框,显示“您必须将其设为 JavaScript 项目等”。 :( :(

我认为 intellij 在这方面要好得多,但是它占用了我所有的 cpu 使用率,这真的很难过 :( 所以我需要切换到 eclipse...

我的问题是:为什么可以'当我的项目是“grails 项目”时,我使用 eclipse 中的 JavaScript 编辑器插件吗?

I downloaded sts and installed the grails/groovy plugins which is fine, but I can not use the JavaScript functionality like jumping through classes and functions in the JavaScript editor.

When I click command and on the functions name, I get a dialog saying "you have to make this a JavaScript project etc." :( :(

intellij is much better at this I think, but it takes all my cpu usage which is really sad :( so I need to switch to eclipse...

My question is: Why can't I use the JavaScript editor plugin from eclipse when my project is a "grails project"?

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

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

发布评论

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

评论(1

野味少女 2024-10-06 13:59:03

Eclipse 的 JavaScript 编辑器是 Eclipse Web Tools Project (WTP) 的一部分。因此,它是随 SpringSource Tools Suite (STS) 一起提供的。

然而,在 Grails 项目创建向导创建的新 STS Grails 项目中,默认情况下不启用 JavaScript 项目方面

要启用它,

  • 请右键单击项目视图中的项目根目录,
  • 选择“属性”,
  • 在“属性”对话框中选择“项目方面”,然后
  • 单击转换为分面形式...
  • 标记 JavaScript 复选框,
  • 然后单击确定

之后,

  • 将有一个新的顶级项目JavaScript资源(您可以在其中浏览ECMA和第三方JavaScript文件的来源),
  • 并且将有代码检查 HTML
  • 和 JavaScript 源文件 中的 em> 和 补全(文件扩展名:.js) ,
  • 包括第三方库。

Eclipse's JavaScript editor is part of the Eclipse Web Tools Project (WTP). Thus, it's shipped with SpringSource Tools Suite (STS).

In new STS Grails projects as created by the Grails project creation wizard, however, the JavaScript project facet is not enabled by default.

To enable it,

  • right-click on the project root in the Project View,
  • select Properties,
  • in the Properties dialog, select Project Facets,
  • click Convert to faceted form...,
  • mark the JavaScript checkbox,
  • and click OK.

After that,

  • there will be a new top-level item JavaScript Resources (where you can browse the sources of ECMA and third-party JavaScript files),
  • and there'll be code inspection and completion in HTML <script> tags
  • and JavaScript source files (file extension: .js),
  • including for third-party libraries.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文