2

I have problems using the code completion/assist for jQuery in the latest Aptana plug-in (3.4). It doesn't seem to be able to infer types:

(function($) {
    $('p .test').each(function() {
        var $this = $(this);
        $(this).*DOES WORK*
        $this.*DOESN'T WORK*
    });
}(jQuery));

When trying to get code completion for a variable created out of $(this), I don't get any assist :( Do you have any advice how to get this solved?

John Dvorak
  • 26,799
  • 13
  • 69
  • 83
The_Unknown
  • 988
  • 2
  • 11
  • 22
  • 1
    `var $(this)` is a syntax error. Did you mean `var $this = $(this)` instead of `var $(this) = $this`? – John Dvorak May 11 '13 at 18:56
  • Sorry, you're right, I meant var $this = $(this). But that doesn't work neither. – The_Unknown May 11 '13 at 22:32
  • isn't here something useful? http://stackoverflow.com/questions/2458071/code-completion-aptana-eclipse-plugin#9917433 – Stano May 11 '13 at 23:50
  • Did you set the project natures in Aptana? YOu can set them with "right click" on the project -> "properties" -> "project natures". Here you can set "web" and/or "PHP", if you are using PHP-libraries. And do you have the jQuery-scriptfile in the project directory? – Felix G. May 12 '13 at 09:23

1 Answers1

0

Here is the answer:

(function($) {
    $('p .test').each(function() {
        var ele = $(this);
        $ele = $(this);
        $(this).*DOES WORK*
        ele.*DOES WORK*
        $ele.*DOES WORK*
    });
}(jQuery));