简体   繁体   English

Eclipse JavaScript自动补全

[英]Eclipse javascript autocompletion

I am editing a .jsp file, and I inserted a <script> html tag, specifying the path of the jquery.js file, then in the next <script> tag, I am trying to use JQuery methods, but it has not autocompletion. 我正在编辑.jsp文件,并插入了<script> html标记,指定了jquery.js文件的路径,然后在下一个<script>标记中,我尝试使用JQuery方法,但它没有自动完成。

在此处输入图片说明

How do I enable autocompletion for JavaScript in HTML/JSP files? 如何在HTML / JSP文件中启用JavaScript自动补全功能? I am currently using Web Tools Project, but I am willing to download any other addon if required. 我当前正在使用Web Tools Project,但是如果需要,我愿意下载任何其他插件。

I think you should have a look to this eclipse plugin https://github.com/angelozerr/angularjs-eclipse and most specifically this one https://github.com/angelozerr/tern.java 我认为您应该看看这个eclipse插件https://github.com/angelozerr/angularjs-eclipse ,最具体地说就是这个https://github.com/angelozerr/tern.java

I use it for angularjs and JS autocompletion. 我将其用于angularjs和JS自动补全。 You can add autocompletion on jQuery and other common libraries. 您可以在jQuery和其他常见库上添加自动补全功能。

To install and use it, look https://github.com/angelozerr/tern.java/wiki . 要安装和使用它,请参阅https://github.com/angelozerr/tern.java/wiki

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM