Make eclipse work better with javascript

I work in a java / eclipse store writing javascript based on php / netbeans background. I still hate the eclipse, but I don’t want to move away from the general set of tools. (Due to problems with our build system, we are currently in the galileo release.)

The syntax coloring is just fine and I'm learning to live with a cab-like interface, but outliner eclipse doesn't correctly recognize things like the template module . Also it does not do a lot of autocomplete on my methods. Can I do anything about this?

I tried installing Aptana, but so far I have not noticed any real improvements in the main editing. I see

+5
source share
2 answers

Make sure you have installed tools for JavaScript developers. See Help / About Eclipse / WTP (one of the icons at the bottom of the dialog box) / JavaScript Developer Tools.

Then go to the Project / Properties / Project Facets web project page and make sure the JavaScript Toolkit cell is selected. After that, you should see a JavaScript / Code Style / Formatter page, as well as other advanced pages such as libraries, checks, etc.

+4
source

Use JSdoc. This will give you background and autocomplete! The other day my life was saved ...

/**
 * @type MyModule
 * @memberOf __MyModule
 */
var MyModule = (/** @constructor */ function () {
  function innerFunc() {
    // blub
  }

  /**
   * @memberOf MyModule
   */
  api.publicFunc = function() {
    // gak
  };
})();
  • @type MyModule is required and must match the name of your real module.
  • @memberOf MyModule /** @constructor */ (.. innerFunc()). "" , @type, Eclipse. ( __MyModule " " .
  • @memberOf API / , (, MyModule.|).

( http://www.eclipse.org/forums/index.php/m/665434/)

+3

All Articles