是否可以将 Jquery 与 Eclipse 集成?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1043198/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-26 10:29:37  来源:igfitidea点击:

Is it possible to integrate Jquery with Eclipse?

jqueryeclipse

提问by Rakesh Juyal

Is it possible to integrate Jquery with Eclipse/MyEclipse? By integrating i mean, if i am working on any JSP or HTML file and i include jquery.js, then it should automatically start code assitance / autocompletion.

是否可以将 Jquery 与 Eclipse/MyEclipse 集成?通过集成我的意思是,如果我正在处理任何 JSP 或 HTML 文件并且我包含 jquery.js,那么它应该自动启动代码辅助/自动完成。



Edited:

编辑:

I don't want to use APTANA ( 127 mb plugin ). If there is other way round please let me know.

我不想使用 APTANA(127 mb 插件)。如果有其他方式,请告诉我。

采纳答案by Rakesh Juyal

I have found a plugin jquerywtpto do the same. This plugin will just patch 'org.eclipse.wst.javascript.ui_xxxxxxx.jar'.

我找到了一个插件jquerywtp来做同样的事情。这个插件只会修补'org.eclipse.wst.javascript.ui_xxxxxxx.jar'。

Note:it is for Jquery 1.2.6

注意:它适用于 Jquery 1.2.6

回答by borayeris

http://marketplace.eclipse.org/content/jsdt-jquerytry this. It supports jQuery 1.7

http://marketplace.eclipse.org/content/jsdt-jquery试试这个。它支持 jQuery 1.7

回答by user106011

I also did not want to download 127MB plugin, and I am doing a big PDT project in Eclipse so I was wary of a new perspective. I spent a bunch of time on Aptana and it never worked, so am sharing my steps to save someone else time. Note I have PDT installed already and some other notes say you have to install Aptana first. That doesn't help me too much.

我也不想下载 127MB 的插件,而且我正在 Eclipse 中做一个很大的 PDT 项目,所以我对新的观点很警惕。我花了很多时间在 Aptana 上,但它从未奏效,所以我分享了我的步骤以节省其他人的时间。注意我已经安装了 PDT,其他一些说明说你必须先安装 Aptana。这对我帮助不大。

  1. Help > Install New Software
  2. Add Aptana download site (http://update.aptana.com/install/studio/)
  3. Important - Uncheck "Group Items By Category"
  4. Select Aptana Web Development Tools (Subset of entire studio)
  5. Complete Installation
  6. On Restart of Eclipse you get a "Customize Aptana Studio" popup
  7. Under AJAX Libraries select JQuery
  8. Get "Aptana Support for jQuery"
  9. Complete installation (second restart of Eclipse)
  10. Open a JS file, Window - Open Perspective - Other - Aptana
  11. Still doesn't work, so Window - Preferences - Aptana / Editors / JavaScript / Code Assist
  12. Check JQuery
  13. File Restart
  14. File New Project - Aptana - Web Project
  15. Create JS file and paste whatever you were working on here, or start new
  1. 帮助 > 安装新软件
  2. 添加 Aptana 下载站点 ( http://update.aptana.com/install/studio/)
  3. 重要 - 取消选中“按类别分组项目”
  4. 选择 Aptana Web 开发工具(整个工作室的子集)
  5. 完成安装
  6. 在 Eclipse 重新启动时,您会看到一个“Customize Aptana Studio”弹出窗口
  7. 在 AJAX 库下选择 JQuery
  8. 获取“Ap​​tana 对 jQuery 的支持”
  9. 安装完成(第二次重启Eclipse)
  10. 打开一个JS文件,Window - Open Perspective - Other - Aptana
  11. 还是不行,所以Window - Preferences - Aptana / Editors / JavaScript / Code Assist
  12. 检查 JQuery
  13. 文件重启
  14. 文件新建项目 - Aptana - Web 项目
  15. 创建 JS 文件并粘贴您在此处处理的任何内容,或者开始新的

I tried all kinds of stuff to get the code-complete to work, I copied over entire htm and js files, saved them, waited a long time after typing a period, etc.

我尝试了各种方法来使代码完整工作,我复制了整个 htm 和 js 文件,保存了它们,输入了一段时间后等待了很长时间,等等。

Now I am going to work on uninstalling Aptana.

现在我将着手卸载 Aptana。

回答by Higegojira

There's no PDT package for Eclipse 3.7 Indigo and downloading it whole through Eclipse "Install New Software" can be very frustrating with sd unstable connection as mine, I've prepared clean install for Windows 64-bit suitable for PHP/JavaScript/jQuery development including the following:

没有适用于 Eclipse 3.7 Indigo 的 PDT 包,通过 Eclipse“安装新软件”下载整个包可能会非常令人沮丧,因为我的 sd 连接不稳定,我已经准备了适用于 PHP/JavaScript/jQuery 开发的 Windows 64 位全新安装,包括下列:

Eclipse 3.7 WebJS Win 64-bit PDT 3.0 Eclipse Color Theme 0.11.1 JSDT jQuery - lightweight plugin to add jQuery support (tiny alternative to heavy plugins Aptana and jQueryWTP)

Eclipse 3.7 WebJS Win 64-bit PDT 3.0 Eclipse Color Theme 0.11.1 JSDT jQuery - 添加 jQuery 支持的轻量级插件(重度插件 Aptana 和 jQueryWTP 的微小替代品)

To enable jQuery code assist (auto completition) right click "JavaScript Resources" in your project (for PHP project you had to enable JavaScript support) and in "Libraries" tab click "Add JavaScript Library". jQuery library should appear among choices. Choose it, confirm everything and you're done. :)

要启用 jQuery 代码辅助(自动完成),请右键单击项目中的“JavaScript 资源”(对于 PHP 项目,您必须启用 JavaScript 支持),然后在“库”选项卡中单击“添加 JavaScript 库”。jQuery 库应该出现在选项中。选择它,确认一切,你就完成了。:)

Download: http://www.fileserve.com/file/MCpZjdvOR http://www.filesonic.com/file/1559490341

下载:http: //www.fileserve.com/file/MCpZjdvhttp://www.filesonic.com/file/1559490341

回答by Jonathan Fingland

yes, using Aptana Studio. It has support for jQuery

是的,使用Aptana Studio。它支持 jQuery

回答by zooglash

Try Aptana, they have code completion for jQuery. You can use it standalone, or as an Eclipse plugin.

试试Aptana,他们有 jQuery 的代码完成功能。您可以单独使用它,也可以将其用作 Eclipse 插件。