title: JavaScript Namespace JavaDoc support in Eclipse
body: <p>I'm originally an electrical engineering guy, so my computer science terminology might be off, but I believe I do what is considered a "namespace":</p>
  
  <pre><code>var MyNamespace = (function(local1, local2, local3){
    // local1 === global1 and so on
  
    // private vars
    var foo;
    var bar;
  
    // private functions
    function isFooBar() {
      return foo == bar;
    }
  
    return {
  
      // public vars
      publicFoo: 'foo',
      publicBar: 'bar',
  
      // public functions
      foo: function() {
        return foo;
      },
  
      bar: function() {
        return bar;
      }
  
    };
  
  })(global1, global2, global3);
  </code></pre>
  
  <p>It might not be the "best" practice, but it's what I and others on my team have been doing for ages.</p>
  
  <p>Now the question: how do I get Eclipse to recognize the hierarchy?  I'd like to eventually get some kind of structure in the outline view like:</p>
  
  <pre><code>MyNamespace
    - local1 (private =&gt; global1)
    - local2 (private =&gt; global2)
    - local3 (private =&gt; global3)
    - foo (private)
    - bar (private)
    O foo() (private)
    O bar() (private)
    O foo() (public)
    O bar() (public)
  </code></pre>
  
  <p>if that makes sense (- for variable, O for function)</p>
  
  <p>At the moment I can put the following JavaDoc comment before a variable or function:</p>
  
  <pre><code>/**
   * description
   * @memberOf MyModule
   */
  </code></pre>
  
  <p>And the function/variable will show up, but I still get some residual nodes for the MyNamespace variable as well as the unnamed function and the global -> local variables.</p>
  
  <p>Without going into semantics of whether or not this is a "correct" way to program JavaScript namespaces, can anyone tell me perhaps a good way to get it so that my namespaces and their public/private vars/functions will show up properly in the outline tab?</p>