28

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.


Edited:

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

Community
  • 1
  • 1
Rakesh Juyal
  • 35,919
  • 68
  • 173
  • 214
  • The aptana plugin download is only 77.8KB. The Full install version is 131 mb. – Jonathan Fingland Jun 25 '09 at 14:19
  • Just use netbeans or intellij -both support jquery out of the box. The reason I switched was the mercurial plugin for eclipse borked my environment, then the download link for new version eclipse didn't work. I should have changed years ago, speaking as someone with 10yrs dev experience in eclipse - I wish I hadn't. – NimChimpsky Aug 08 '12 at 12:48

6 Answers6

15

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

borayeris
  • 2,603
  • 1
  • 27
  • 31
9

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.

  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

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.

Now I am going to work on uninstalling Aptana.

user106011
  • 1,993
  • 2
  • 13
  • 2
8

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

Note: it is for Jquery 1.2.6

Rakesh Juyal
  • 35,919
  • 68
  • 173
  • 214
4

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 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)

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. :)

Download: http://www.fileserve.com/file/MCpZjdv OR http://www.filesonic.com/file/1559490341

Higegojira
  • 41
  • 1
3

yes, using Aptana Studio. It has support for jQuery

Jonathan Fingland
  • 56,385
  • 11
  • 85
  • 79
  • Will it show the code assistance based on the file/.js i have included? That is if i will include Jquery 1.2.js then will it show autocompletion of 1.2 and if i will include 1.3 version then it should show the 1.3 version ? – Rakesh Juyal Jun 25 '09 at 11:09
  • It shows code assistance for jquery 1.3, I believe (not for 1.2, sorry). It also has code assist for other frameworks, (e.g. dojo 1.2, ext 2.2 and yui 2.7) – Jonathan Fingland Jun 25 '09 at 12:16
  • 2
    Though Aptana can do what i require. But installing 127 mb of software [ i installed eclipse plugin not standalone aptana ], for making a 118KB of code(Jquery) work, doesn' seems reasonable. – Rakesh Juyal Jun 25 '09 at 13:08
  • Aptana's general js handling is also far superior to the built-in javascript tools. Personally I also use it for html/css so in my case it does everything I need. – Jonathan Fingland Jun 25 '09 at 14:14
2

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

zooglash
  • 1,750
  • 13
  • 16