0

I'm writing a JavaScript class that looks like bellow and using Eclipse IDE for the task. (Eclipse Neon to be specific)

function Test(){}
(function()
{

    var abc = 1;

    // private function
    function foo(){
        // do stuff
        console.log('private FUNC');
    }

    // public function
    this.publicStuff = function(){
        // do something
        abc++;
        foo();
    }

}).apply(Test)

While the class grows bigger I'm using Eclipse's outline view to navigate inside it, BUT this is how eclipse is showing me the outline for the above

eclipse neon JavaScript test class print screen with outline

As you can see the private function foo is shown using the green icon which means public. The private variable is abc is shown green (public) also and the public function is not shown

Truth is that I'm a beginner in writing real deal JavaScript even if I'm writing small JavaScript functions to help the UI here and there for a while now.

Can anyone guide me in how to write a JavaScript class and have it nicely highlighted in eclipse outline view. (not changing eclipse though)

Thanks

Bogdan
  • 1,840
  • 1
  • 25
  • 39
  • This answer might help: http://stackoverflow.com/questions/23544328/how-to-make-javascript-function-visible-in-eclipse-outline-view – Alex Pánek Mar 16 '17 at 08:56
  • by the way, the @memberOf annotation produces no effect. I'm running eclipse for PHP developers, am I missing some plugin or something? – Bogdan Mar 16 '17 at 10:29

0 Answers0