在eclipse中自动完成jQuery [英] Auto-complete jQuery in eclipse

查看:197
本文介绍了在eclipse中自动完成jQuery的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用eclipse的javascript霓虹版本。
当我输入 do 并按 Ctrl + Space 出现中,但是文档中没有。如果我以后使用了文档,但是我希望它能够提供所有可能的合理延续。
在JS项目中 - > JavaScript资源是两个库。
ECMAScript内置库和ECMA 3浏览器支持库。
在第二个是我感兴趣的所有方法,但是在我明确使用之前,它们不会显示在自动完成中。



我在stackoverflow上看不起来:




  • 窗口→首选项→JavaScript→编辑器→内容辅助→恢复默认值。对于某些人来说,它解决了问题,但对我来说,它没有起作用。

  • 创建新的项目和复制文件

  • 窗口→首选项→JavaScript→编辑器→内容辅助→高级→其他JavaScript提案已被检查。


解决方案

不幸的是,自动完成JavaScript代码在Eclipse Neon中不起作用。原因在此错误的答案中被描述: Eclipse错误描述
这个问题可以通过在Eclipse中安装Tern插件来解决。详细说明可以在这里找到: Tern安装指南



您还可以将eclipse降级到Mars版本,其中autocompletion可以开箱即用,但它只支持较旧版本的javascript。


I use the eclipse javascript neon version. When I type do and press Ctrl + Space there appears the suggestion for do while but none for document. If I used document once it appears in future uses but I want that it suggests all the possible reasonable continuations. In a JS Project -> JavaScript Resources are two libraries. ECMAScript Built-In Library and ECMA 3 Browser Support Library. In the second are all the methods I'm interested but they don't show up in the auto-completion before I use the explicitly.

Things that I read on stackoverflow that did not work:

  • Window → Preferences → JavaScript → Editor → Content Assist → Restore Defaults. For some it resolved the problem but for me it did not work.
  • Make new Project and copy files
  • Window → Preferences → JavaScript → Editor → Content Assist → Advanced → Other JavaScript Proposals are already checked.

解决方案

Unfortunately autocompletion of javascript code does not work in Eclipse Neon for this moment. The reason is desribed in this bug's answer: Eclipse bug description. This problem can be solved by installing Tern plugin in Eclipse. Detailed instruction can be found here: Tern installation guide.

You can also downgrade eclipse to Mars version, where autocompletion works out of the box, however it supports only older versions of javascript.

这篇关于在eclipse中自动完成jQuery的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆