jQueryWTP

一、jQueryWTP的安装方法(官方):

step1:downloadjqueryWTP_version.jar

step2:findyouEclipsePluginorg.eclipse.wst.javascript.ui_xxxxxxx.jar,backuptheplugin.

step3:doubleclickthejarfileorrunwithcommandjava-jarjqueryWTP.version.jar

step4:ontheopenedswingUI,chooseorg.eclipse.wst.javascript.ui_xxxxxxx.jar,andoutputdir.

step5:clickgeneratebutton.

step6:replaceoldorg.eclipse.wst.javascript.ui_xxxxxxx.jarfilewiththegeneratedfile.

step7:restarteclipse.

step8:openahtmlfile,editjscontent.

jQueryWTP插件项目的主页:http://www.langtags.com/jquerywtp/

但是下载完jqueryWTP0.31foCN.jar后,根据安装教程里都提到了一个plugin目录下的org.eclipse.wst.javascript.ui_xxxxxxx.jar文件,但是我的eclipse目录想压根就找不到这个文件,所以也要就不能使用jQueryWTP插件智能提示.

后来仔细查看jQueryWTP插件项目的主页,有这么一句话,Eclipse的WTP支持Javascript的代码补全功能,但是很简单,而且不支持jQuery,jQueryWTP的目的就是让EclipseWTP支持jQuery,需要说明的是该插件对于MyEclipse等基于EclipseWTP的工具也是支持的.

根据这句话可以猜想找不到plugin目录下的org.eclipse.wst.javascript.ui_xxxxxxx.jar文件的原因,可能是没有安装eclipseWTP插件,由于下面两种方法顺利安装并且支持jQuery智能提示,所以这里的猜想还没有经过验证.

二、Spket的安装方法(两种方式):

1.在线安装:Help->InstallNewSoftware...->Add...->Name:"Spket",

Location:http://www.spket.com/update/下载完毕重启Eclipse.

2.手动安装:到http://www.spket.com/download.html下载Plugin版本,当前版本为1.6.17.下载解压后直接放置于Eclipse的dropins目录下,重启Eclipse.

3.下载jQuery文件,(要下载开发版本).

4.设置spket,Window->Preferences->Spket->JavaScriptProfiles->New,输入“jQuery”点击OK;选择“jQuery”并点击“AddLibrary”然后在下拉条中选取“jQuery”;选择“jQuery”并点击“AddFile”,然后选中你下载的jQuery.js文件;设成Default;

5.设置js打开方式(这一步很重要,不设置的话,也不会有jQuery的智能提示),Window->Preferences->General->Editors->FileAssociations->选择*.js,将SpketJavaScriptEditor设为Default。

6.新建一个js文件,jQuery自动提示!!

三、Aptana的安装方法:

Aptana的安装相对比较简单,直接安装完毕就支持jQuery的智能提示,而且智能提示功能也比较强大,按照下面的安装就能使用,强烈建议初学者可以使用这种方法安装:

1.在线安装:Help->InstallNewSoftware...->Add...->Name:"Aptana",

Location:http://download.aptana.com/tools/studio/plugin/install/studio下载完毕重启Eclipse,Aptana插件安装成功,支持javascript智能提示功能,但还不支持jQuery智能提示,需要再安装支持jQuery智能提示的插件.

2.Window->MyStudio打开Aptana的首页,单击首页上面的Plugins,选择Ajax下面的jQuerySupport,单击GetIt即可安装jQuery智能提示的插件

3.新建一个js文件就会有jQuery智能提示了.

另外,如果这三个插件都安装成功的话,想选择其中一个插件使用,应该如果操作呢?方法如下:

Window->Preferences->General->Editors->FileAssociations,选择”*.js”,再选择”AptanaJSEditor”或”SpketJavaScriptEditor”设置为默认即可.

相关推荐