arunnair85 / jsdt-jquery

Automatically exported from code.google.com/p/jsdt-jquery
0 stars 0 forks source link

Unable to get auto-complete to work #4

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Installed jsdt-jquery into Eclipse 3.7 using this link 
https://svn.codespot.com/a/eclipselabs.org/jsdt-jquery/updatesite
2. Converted the project to Javascript
3. In the project properties added jQuery 1.6 to the include path and checked 
jQuery on the "Global SuperType" tab.  (ECMA 3 Browser support was checked as 
well)
4.  Created a new Javascript Source file and typed in: $('a').ad

What is the expected output? What do you see instead?

Expected to see the auto-suggest listing entries starting with 'ad'.
Instead there was a pause after i typed '.' with the cursor displaying busy 
status for a couple of seconds.  Then ad appeared but no auto-suggest.  Hitting 
'ctrl-space' brought up the auto-suggest but it only showed: B.addObserver - B 
and element.addObserver - element
Starting Eclipse with '-clean' parameter, removing Aptana studio, reinstalling 
jsdt-jquery a couple of times had no affect.

What version of the product are you using? On what operating system?
I'm on Windows 7, Eclipse 3.7, JSDT 1.3.1, JSDT-jquery 1.0.2, PDT 3.0.0

Please provide any additional information below.

Original issue reported on code.google.com by outr...@gmail.com on 20 Oct 2011 at 12:40

GoogleCodeExporter commented 9 years ago
It looks as if JSDT 1.3.1 contained some updates to the type inferencer that 
broke it. Previously the prototype of a function was considered also when it 
was invoked without new. This is now fixed but I was relying on this.

I put out a new version 1.1 that should fix this. You should get it by just 
checking for updates. Can you try and see if that fixes it? 

There is however one caveat with the 1.1 version. Autocompletion only works on 
the jQuery object, not the jQuery global.

This should work
$("h1").addClass("one")

This should not
$.ajax

This is not very nice but I figured it's better than no content assist at all.

Original comment by philippe...@gmail.com on 29 Oct 2011 at 3:58