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.
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
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 key
was 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 myDiv
variable 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:
This question has been puzzling me for months.
You can use
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.
链接地址: http://www.djcxy.com/p/48502.html上一篇: :第一次安装或使用软件包时运行代码