Every now and then I try to look for a good HTML and Javascript editor or IDE, but most tools I find from google are either commercial (e.g.
IntelliJ) or simply not convincing enough that they will do the job properly. So the mission had not been successful and all the way I had been stuck with Textpad, until today. Today, I have come across
this article about the Eclipse's Javascript Development Tools (JSDT) and found it extremely interesting because of my positive experience with Eclipse for Java. Unfortunately, the current documentation for JSDT sucks, if there is any. For instance, if you have already read the article above, you should be confused as to whether the T in JSDT stands for Toolkits or Tools >_<. Anyway, this is
the official website for JSDT and it says "Tools" so I will stick with it. Installation can also be confusing because JSDT is part of the
Eclipse's Web Tools Platform project (Web Developer Tools).
Without further ado, here are the steps for installation:
- Open Eclipse
- Go to Window > Preferences, search for Proxy and then configure the Network Connections if required
- Go to Help > Software Updates, click on the "Available Software" tab
- Expand the "Web Tools (WTP) Update Site"
- At the bottom you should see "Web Tools Platform (WTP)" with the newest version number. Expand that.
- Select "JavaScript Developer Tools" and "Web Developer Tools" and then click on Install at top-right. Ignore the "SDK" versions. Depending on your Eclipse version, "Web Developer Tools" may already be installed and you will get a message about that. If you only install "JavaScript Developer Tools", you won't be able to edit HTML, which is a headache, so please make sure both are installed!
That's it. Just open a new "Javascript Project" and play around. For instance, you can open a new javascript file with .js extension, and then type in "document." and then press ctrl-space, you will then see all the code completion suggestions. Write a few functions or classes in another javascript file and those declarations will be available via code completions as well (even they are not "included" at runtime, which is an imperfection of the IDE IMO). You can also right-click on the project, click on properties, go to JavaScript>JavaScript Libraries and then add the FireFox and IE libraries. But I don't find this particularly useful because after inclusion I still don't see the "innerHTML" property correctly referenced.
While I'm still in a good mood to share, let me share this article as well -
10 Eclipse Navigation Shortcuts Every Java Programmer Should Know [many applies to non-java as well]
[update 29/12/08] Although not free,
IntelliJ IDEA 8 is definitely worth a try - get the 30-day trial!!
Aptana is also worth checking out; it's free and Eclipse-based. Referencing is also smarter than other Eclipse variants!
2 comments:
I take some of my words back. JSDT isn't all that smart after all; you gotta learn to live with ERRORS if you really want to use it.
Rely on FireBug for code validation.
Another option is JSEclipse (by Adobe), but it doesn't do much a better job.
Conclusion --- javascript editors still suck.
After actually installing and playing each of the editors/IDEs for a while, here is my verdict - starting from the best:
1) Aptana
2) IntelliJ (not worse than Aptana, but licensing is a problem)
3) JSDT
4) JSEclipse
Of course, Aptana can't do J2EE development like IntelliJ and JSDT. But for just HTML & Javascript, it is my current favourite.
Post a Comment