转自:[url=http://www.cnblogs.com/shulin/archive/2010/08/09/1796146.html]http://www.cnblogs.com/shulin/archive/2010/08/09/1796146.html[/url]
常用的有三个插件支持jquery的智能提示:<br>1.jquerywtp<br>2.spket<br>3.aptana
在安装插件之前需要先安装eclipse,如果已经安装了eclipse,可以直接看下面的插件安装方法,本人使用的fedora 12,操作如下:<br>1.直接打开”应用程序”-->”系统工具”-->”终端”<br>2.输入命令”su”,这个命令是临时切换到root用户<br>3.输入root用户的密码<br>4.输入命令”yum install eclipse”<br>5.安装成功后,就可以在”应用程序”-->”编程”-->”eclipse”,打开查看版本为eclipse 3.5.1,当然也可以直接下载安装,这里就不再细说了,安装完毕后就可以安装相关插件了.
以下分别介绍三个插件的安装方法:<br>[b]一、jquerywtp的安装方法(官方):[/b]<br>step1:download jquerywtp_version.jar<br>step2:find you eclipse plugin org.eclipse.wst.javascript.ui_xxxxxxx.jar,backup the plugin.<br>step3:double click the jar file or run with command java -jar jquerywtp.version.jar<br>step4:on the opened swing ui,choose org.eclipse.wst.javascript.ui_xxxxxxx.jar,and output dir.<br>step5:click generate button.<br>step6:replace old org.eclipse.wst.javascript.ui_xxxxxxx.jar file with the generated file.<br>step7:restart eclipse.<br>step8:open a html file,edit js content.
jquerywtp插件项目的主页:http://www.langtags.com/jquerywtp/<br>但是下载完jquerywtp0.31focn.jar后,根据安装教程里都提到了一个plugin目录下的org.eclipse.wst.javascript.ui_xxxxxxx.jar文件,但是我的eclipse目录想压根就找不到这个文件,所以也要就不能使用jquerywtp插件智能提示.
后来仔细查看jquerywtp插件项目的主页,有这么一句话,eclipse的wtp支持javascript的代码补全功能,但是很简单,而且不支持jquery,jquerywtp的目的就是让eclipse wtp支持jquery,需要说明的是该插件对于myeclipse等基于eclipse wtp的工具也是支持的.<br>根据这句话可以猜想找不到plugin目录下的org.eclipse.wst.javascript.ui_xxxxxxx.jar文件的原因,可能是没有安装eclipse wtp插件,由于下面两种方法顺利安装并且支持jquery智能提示,所以这里的猜想还没有经过验证.
[b]二、spket的安装方法(两种方式): [/b]<br>1.在线安装:help->install new software...->add...->name: "spket",<br>location:http://www.spket.com/update/ 下载完毕重启eclipse.<br>2.手动安装:到http://www.spket.com/download.html下载 plugin 版本,当前版本为1.6.17.下载解压后直接放置于eclipse的dropins目录下,重启eclipse. <br>3.下载jquery文件,(要下载开发版本). <br>4.设置spket ,window -> preferences -> spket -> javascript profiles -> new,输入“jquery”点击ok; 选择“jquery” 并点击“add library”然后在下拉条中选取“jquery”; 选择 “jquery”并点击“add file”,然后选中你下载的jquery-1.3.2.js文件,该插件目前只支持到jquery 1.3.2版本,1.4.2不支持,设成default。<br>5.设置js打开方式(这一步很重要,不设置的话,也不会有jquery的智能提示), window -> preferences ->general-> editors-> file associations-> 选择*.js,将spket javascript editor设为default。 <br>6.新建一个js文件,jquery自动提示!!
[b]三、aptana的安装方法:[/b]<br>aptana的安装相对比较简单,直接安装完毕就支持jquery的智能提示,而且智能提示功能也比较强大,按照下面的安装就能使用,强烈建议初学者可以使用这种方法安装:<br>1.在线安装:help->install new software...->add...->name: "aptana",<br>location:http://download.aptana.com/tools/studio/plugin/install/studio下载完毕重启eclipse,aptana插件安装成功,支持javascript智能提示功能,但还不支持jquery智能提示,需要再安装支持jquery智能提示的插件.<br>2.window->my studio打开aptana的首页,单击首页上面的plugins,选择ajax下面的jquery support,单击get it即可安装jquery智能提示的插件
常用的有三个插件支持jquery的智能提示:<br>1.jquerywtp<br>2.spket<br>3.aptana
在安装插件之前需要先安装eclipse,如果已经安装了eclipse,可以直接看下面的插件安装方法,本人使用的fedora 12,操作如下:<br>1.直接打开”应用程序”-->”系统工具”-->”终端”<br>2.输入命令”su”,这个命令是临时切换到root用户<br>3.输入root用户的密码<br>4.输入命令”yum install eclipse”<br>5.安装成功后,就可以在”应用程序”-->”编程”-->”eclipse”,打开查看版本为eclipse 3.5.1,当然也可以直接下载安装,这里就不再细说了,安装完毕后就可以安装相关插件了.
以下分别介绍三个插件的安装方法:<br>[b]一、jquerywtp的安装方法(官方):[/b]<br>step1:download jquerywtp_version.jar<br>step2:find you eclipse plugin org.eclipse.wst.javascript.ui_xxxxxxx.jar,backup the plugin.<br>step3:double click the jar file or run with command java -jar jquerywtp.version.jar<br>step4:on the opened swing ui,choose org.eclipse.wst.javascript.ui_xxxxxxx.jar,and output dir.<br>step5:click generate button.<br>step6:replace old org.eclipse.wst.javascript.ui_xxxxxxx.jar file with the generated file.<br>step7:restart eclipse.<br>step8:open a html file,edit js content.
jquerywtp插件项目的主页:http://www.langtags.com/jquerywtp/<br>但是下载完jquerywtp0.31focn.jar后,根据安装教程里都提到了一个plugin目录下的org.eclipse.wst.javascript.ui_xxxxxxx.jar文件,但是我的eclipse目录想压根就找不到这个文件,所以也要就不能使用jquerywtp插件智能提示.
后来仔细查看jquerywtp插件项目的主页,有这么一句话,eclipse的wtp支持javascript的代码补全功能,但是很简单,而且不支持jquery,jquerywtp的目的就是让eclipse wtp支持jquery,需要说明的是该插件对于myeclipse等基于eclipse wtp的工具也是支持的.<br>根据这句话可以猜想找不到plugin目录下的org.eclipse.wst.javascript.ui_xxxxxxx.jar文件的原因,可能是没有安装eclipse wtp插件,由于下面两种方法顺利安装并且支持jquery智能提示,所以这里的猜想还没有经过验证.
[b]二、spket的安装方法(两种方式): [/b]<br>1.在线安装:help->install new software...->add...->name: "spket",<br>location:http://www.spket.com/update/ 下载完毕重启eclipse.<br>2.手动安装:到http://www.spket.com/download.html下载 plugin 版本,当前版本为1.6.17.下载解压后直接放置于eclipse的dropins目录下,重启eclipse. <br>3.下载jquery文件,(要下载开发版本). <br>4.设置spket ,window -> preferences -> spket -> javascript profiles -> new,输入“jquery”点击ok; 选择“jquery” 并点击“add library”然后在下拉条中选取“jquery”; 选择 “jquery”并点击“add file”,然后选中你下载的jquery-1.3.2.js文件,该插件目前只支持到jquery 1.3.2版本,1.4.2不支持,设成default。<br>5.设置js打开方式(这一步很重要,不设置的话,也不会有jquery的智能提示), window -> preferences ->general-> editors-> file associations-> 选择*.js,将spket javascript editor设为default。 <br>6.新建一个js文件,jquery自动提示!!
[b]三、aptana的安装方法:[/b]<br>aptana的安装相对比较简单,直接安装完毕就支持jquery的智能提示,而且智能提示功能也比较强大,按照下面的安装就能使用,强烈建议初学者可以使用这种方法安装:<br>1.在线安装:help->install new software...->add...->name: "aptana",<br>location:http://download.aptana.com/tools/studio/plugin/install/studio下载完毕重启eclipse,aptana插件安装成功,支持javascript智能提示功能,但还不支持jquery智能提示,需要再安装支持jquery智能提示的插件.<br>2.window->my studio打开aptana的首页,单击首页上面的plugins,选择ajax下面的jquery support,单击get it即可安装jquery智能提示的插件