Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Javascript plugin for Eclipse?

I am very happy with Eclipse and don't want to change my IDE, but find the pre-bundled Eclipse plugin for JavaScript too difficult to work with.

Too many of the features that I got used to developing Java (not JavaScript) in Eclipse seem to be missing or incomplete, such as an intelligent code analysis, smart refactorings, a truly language-related (not full-text) reference search, class inheritance trees, etc.

Any suggestions for alternative Eclipse plugins for JavaScript development?

Admittedly, it is a lot more difficult to analyze JavaScript code (compared to Java) not only for a plugin but also for any human programmer, because JavaScript comes with fewer structural elements, and because there are so many different ways to do common things like inheritance or modularization. But there's got to be something, right?

like image 536
zappzapp Avatar asked Jan 17 '14 09:01

zappzapp


3 Answers

As Nodeclipse lead, I am always looking for what is available in Eclipse ecosystem.

JavaScript support is Eclipse JSDT project. It gives Editor, and JSDoc support.

For ES5 support, JSDT validation is to be disabled and JSHint-Eclipse used.

Also there is new Tern-IDE plugins, that gives hints and go to definition by using Tern.js.
The same author leads AngularJS plugin

All mention plugins can be got via Enide Studio 2014 (installed as plugins or downloaded as stand-alone product).
Nodeclipse site has even more links, and I am inviting to collaborate on the JavaScript tools on GitHub

There are also JSON Editor and Json Tools.

Unfortunately VJET is no longer continued as there is no backing company now.

All effort are community driven. The simplest contribution is reporting bug or taking own issue to research and share.

Any suggestions for alternative Eclipse plugins for JavaScript development?

No alternative plugins, just get more of them.

like image 190
Paul Verest Avatar answered Nov 05 '22 08:11

Paul Verest


The VJET plugin seems to provide better JavaScript support, although I haven't tested it very extensively. http://eclipse.org/vjet/

For necessary code hygiene I recommend to use JSHint (a sane version of JSLint). http://marketplace.eclipse.org/content/jshint-eclipse

Both are installable through the built-in Eclipse Marketplace.

The popular Aptana IDE, which is based on Eclipse, is also available as plugin, but I haven't tested it as plugin. http://www.aptana.com/products/studio3/download

My personal opinion: Eclipse has outdated syntax validators (no ECMAScript 5 support) and non of the plugins can fix that. The problem is known for years (Bug Report), but nothing is done about it. Code completion seems to be a lot better in the WebStorm IDE or Sublime Text with certain plugins. Right now, I'm quite happy using Eclipse for my backend Java stuff and WebStorm for the frontend code for the same project.

like image 2
Tilman Schweitzer Avatar answered Nov 05 '22 08:11

Tilman Schweitzer


A. In the Eclipse world...in my opinion... the best JavaScript support is currently given by Eclipse Orion, a web based variant of Eclipse: https://orionhub.org

Orion applies tern.js to get JavaScript features like highlighting and completion:

Eclipse orion code completion

The JavaScript library tern.js seems to be up to date:

https://github.com/ternjs/tern

And it is applied by several Source Code Editor plugins:

https://ternjs.net/#plugins

B. On the other hand, all JavaScript plugins for Eclipse seem to be outdated.

See for example http://www.eclipse.org/webtools/development/news/main.php (last updated 2016)

The Eclipse Plugin for tern.js seems to be out of date, too:

https://marketplace.eclipse.org/content/tern-eclipse-ide

I was not able to install it on the current Eclipse version Photon.

Also see https://github.com/angelozerr/tern.java/issues/463

C. If you are open for a commercial JavaScript editor, try to use WebStorm, als already suggested by Tilman.

If there is a good Eclipse based JavaScript solution, that I am not aware of and that is able to compete with the features of WebStorm, please let me know.

like image 1
Stefan Avatar answered Nov 05 '22 10:11

Stefan