Code Completion -- Aptana Eclipse Plugin

Posted by jwmajors81 on Stack Overflow See other posts from Stack Overflow or by jwmajors81
Published on 2010-03-16T20:56:48Z Indexed on 2010/03/16 22:21 UTC
Read the original article Hit count: 742

Filed under:
|
|

I have been doing javascript development for the last couple weeks and have tried JSDT and Aptana to assist in code completion. JSDT wasn't very good at all, but I did have more luck with Aptana (used as eclipse plug-in, not the standalone product). The problem I'm encountering is that when I create javascript classes I cannot get code completion to work. For example, if I use the following then code completion doesn't work:

var foo = new function(value){
   this.myMethod= function(){
   }
}

I have also verified that the following won't work:

function foo(value){
   this.myMethod= function(){
   }
}

I have found that using a JSON style does work:

var foo = {
    myMethod: function(){

    }
}

Does anyone know why Aptana works for the last style, but not the first? Using the JSON style won't work for me because I have to have seperate instances of the class in question.

Also, I am not very successful in getting code completion to work across files. For example, if I have 3 files in the javascript directory then I usually cannot get Aptana to pick up the JSON style markup in the other two classes. This DID work at one point (for the first 2 classes I created), but since then whenever I add new classes they aren't picked up.

Thank you very much for you assistance.

Jeremy

© Stack Overflow or respective owner

Related posts about eclipse

Related posts about aptana