Eclipse的JavaScript编辑器:内容助攻js文件,自动完成 [英] Eclipse JavaScript Editor: content assist for js files, autocompletion
问题描述
我想要的Eclipse(与JavaEE的和Web开发插件)作为的JavaEE / GoogleAppEngine IDE。在HTML编辑器,如果我把一个<脚本... SRC =.../>
在< HEAD>
我自动获得内容帮助对JavaScript中引用的文件。我不知道是否有可能获得内容帮助其他JavaScript文件(例如jQuery的或自制JS库)的JavaScript编辑器中。
I'm trying Eclipse (with JavaEE and Web Development plugins) as a JavaEE/GoogleAppEngine IDE. In HTML editor if I put a <script ... src="..." />
in <head>
I automatically get content assist for JavaScript in the referenced file. I was wondering if it was possible to obtain content assist for other JavaScript files (e.g. jQuery or homebrew js library) inside JavaScript editor.
推荐答案
我只是想出了如何获取JS内容协助 Eclipse的JavaScript编辑器(不集锦插件):
I just figured out how to obtain js content assist in Eclipse JavaScript editor (without Aptana plugins):
如果项目类型本身并不包含JavaScript支持:打开网页(或JavaScript)的角度来看,该项目右键单击并选择的 Web开发支持的>的添加JavaScript的支持(这不会伤害,如果JavaScript的支持已经present)
If the project type doesn't natively contain JavaScript Support: open Web (or JavaScript) perspective, right-click on the project and select Web Development Support > Add JavaScript Support (this won't hurt if JavaScript support is already present)
然后右键单击的 JavaScript的支持的项目中,选择的属性的,在JavaScript部分去JavaScript库,然后选择源选项卡:在这里你可以添加文件夹和文件按内容进行扫描有助于为当前项目
then right-click JavaScript Support within the project and select Properties, in the JavaScript section go to JavaScript library and then select Source tab: here you can add folders and files to be scanned by content assist for the current project
在的Aptana Studio的(作为Eclipse插件,但我想独立版本几乎是一样的):打开任何JS或HTML文件,显示的参考的窗口(或打开在Eclipse中要添加到JavaScript的范围Aptana透视图)和拖放js文件(这是有可能建立并激活不同的JavaScript文件和资源范围不同的配置文件:点击的在窗口中添加配置文件的工具栏)
In Aptana Studio (as an eclipse plugin but I suppose the standalone version is almost the same): open any js or html file, show References window (or open Aptana perspective in eclipse) and drag-drop js files you want to add to JavaScript scope (it is possible to build and activate different scope profiles with different JavaScript files and resources: just click add profile in the window toolbar)
这篇关于Eclipse的JavaScript编辑器:内容助攻js文件,自动完成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!