Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

eclipse javascript editor '10

I am going to ask the same question as JavaScript editor within Eclipse because it was written in 2010 and answers from 2008 are not true any more.

So, "I'm looking for opinions on the best JavaScript editor available as an Eclipse plugin".

Many thanks.

like image 749
daniel.sedlacek Avatar asked Oct 26 '10 15:10

daniel.sedlacek


3 Answers

You can Install Web Tools Platform (WTP) or download Indigo's Eclipse IDEs for Java EE Developers or Eclipse IDEs for JavaScript Web Developers which come bundled with WTP. WTP consists of the JavaScript Development Tools (JSDT) which supports the development of JavaScript applications and JavaScript within web applications.

And since I also use jQuery, I have also installed JSDT-jquery plugin to support jQuery library which can be downloaded form the marketplace JSDT-jquery Plugin

like image 199
Ravi Kadaboina Avatar answered Nov 11 '22 22:11

Ravi Kadaboina


I know you asked for Eclipse but VS2010 is far superior for javascript than any other editor I have used. It gives contextual autocomplete that digs deeper than I've ever seen anywhere else. The express edition for visual studio web developer 2010 is free by the way.

I personally don't really like Microsoft but as a javascript editor it just makes me a lot more productive.

example: I once made a (bad) templating solution that transformed javascript objects to DOM elements like this:

var html = { tag: 'div', id: 'myDiv', content: [
  'Hello ',
  { tag: 'span', content: 'world!' }
]}

would transform into

<div id="myDiv">Hello <span>world!</span></div>

By calling

var myDiv = DOM.create(html);

Now I did this by recursively traversing the javascript object and calling for(key in html). In there I nested a if(html.hasOwnProperty(key)). In there I checked whether keywas equal to 'tag' and in that if statement I did the document.createElement(html[key]). Now I know this is pretty bad code and I am forgetting some steps but that's not the point.

Visual studio was able to autocomplete properties on the myDivvariable for a div element. Add that the javascript was included from another file than the one I was calling it from. You might not be impressed by that but my mind was blown.

Check following blogposts for more details:

like image 26
Jan Avatar answered Nov 11 '22 20:11

Jan


This question has been puzzling me for months.

You can use

  • Amateras Javascript Editor for automatic including certain linked files;
  • Javascript Editor (Eclipse WDT JSDT) for intelligent code highlighting;
  • Javascript Source Editor (Aptana plugin) for outlining Object Literal statements;

I am looking for and asked a question about an editor that has all these pretty significant features, but some conservative rep-gatherers found it unfit for stackoverflow.

like image 1
Redsandro Avatar answered Nov 11 '22 20:11

Redsandro