tags:

views:

2418

answers:

5

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.

+3  A: 

yes, using Aptana Studio. It has support for jQuery

Jonathan Fingland
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
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
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
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
+3  A: 

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

zooglash
+6  A: 

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
+2  A: 

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.

A: 

thanks a lot for this. It's really helpfull!

Matheus