NitroX
So NitroX turns out to be a pretty good piece of software.
The installation is through an installshield application, and is relatively straightforward. You have the option of installing a plugin, or a full version. Even with the full version, it will ask you if you want to use an existing Eclipse home, but you can ignore that and just use the Eclipse that comes in with NitroX. However, the installshield application means that you can only install NitroX on Windows.
I was feeling paranoid about Eclipse, so I exported all my Eclipse preferences and then pointed NitroX at my workspace.
Once you’ve installed the application, the setup is relatively painless. You can right click on a project and convert it to a “Web Application” project. Once you’ve done that, it looks for web.xml files and intuits the TLD locations automatically. It does not, however, do completion until you’ve added the taglib classes to your Eclipse project libraries.
The integration into Eclipse is mostly seamless, and very much inline with the Eclipse way of doing things. There is a separate web perspective, which will show you all the views associated with NitroX. If you are on the Java perspective, the only indication that you are looking at a NitroX project is a slightly different icon next to the project and a green circle on the web application itself.
The only exception to this integration is the File Association of XML and HTML files, which can be intrusive. For example, if you have a package.html file in your package and you click on it, NitroX will popup a warning saying that the NitroX editor can only be used under a web application, and this warning will popup every time you invoke that file. I fixed this by opening the File Associations dialog and making the text editor the default for ”.xml” and ”.html” files.
The NitroX interface shows a host of different views alongside the JSP editor. There’s a tag libraries view, a page variables view, a properties view, an outline and a web applications view. The web application view is the most useful, as it starts off from the root of the web application itself, and shows only the JSP files.
NitroX JSP completion works as advertised. Drop-down lists show up instantly, and get filtered out as you type. Required tag attributes are included automatically, although it won’t complain if you remove them, and doesn’t object to mistyped attributes. It keeps track of page variables, and will autocomplete with the appropriate type. This means you can do things like:
<% String foo = "foo"; int bar = 3; %>
<% foo.charAt([expands to bar]) %>
You can also keep NitroX happy with external variables in situations where you’re using external variables by giving it some comment hints.
NitroX also understands EL expressions from JSTL, and will appropriately complete, highlight and validate JSTL, including the implicit objects, which is a huge win.
NitroX will also complete HTML elements and attributes. Again, it won’t validate, and will happily add mistyped attributes to the list, but this is still a massive improvement over a text editor. The only completion omission I found is that I couldn’t autocomplete a JSP comment in NitroX, either by hand or using Ctrl-/.
NitroX is weaker on embedded Java, at least compared to Eclipse proper. It will do completion of classes, variables and methods appropriately. Class completion does not take the type filters in Java into account. NitroX will not apply Java syntax highlighting, although it does try to fake it by highlighting primitives. More disturbingly, it’s possible to do silly things like this:
<% String s = request; %>
or this:
<% /* %>
No syntax checking, obviously.
Content assist inside embedded Java is missing. There’s no javadoc on classes or methods in embedded Java. No source view. No popup tooltips. And it won’t certainly try to guess variables in methods.
But even in the JSP blocks, NitroX doesn’t make use of Eclipse context and annotation features. There’s no “Mark occurences” functionality, so you can’t mark out blocks of text from JSP. You can’t use templates from NitroX, even in the embedded Java sections. You can add tasks and bookmarks, but you can’t use Eclipse’s built-in task tags, so a <%– FIXME –%> inside a comment block does nothing.
In addition, NitroX doesn’t have a context menu on the source editor. When I right click on a tag, I would expect to see context information, possibly a context popup that highlights where that tag begins and ends. NitroX will provide context-sensitive views (i.e. you’ll see the tag’s properties and a smart editor in views) but there is no dialog or refactoring/source information. However, there is a context menu on the design view of the editor, which provides you with a selection of CSS styles, fonts, and other handy HTML options.
There is no reformatting. You can get around this by using the JSPFormat plugin.
There’s no folding. This is a problem. Historically, I’ve been using jEdit for JSP and XML files, and I use folding on a regular basis there to determine the start and end of a section (since otherwise I don’t know if I’ve missed a
The advanced functionality of NitroX is based around JSF and Struts. NitroX offers functionality that shows the rendered page in addition to the source. This functionality is wasted on me, as it doesn’t support the ATG DSP tag library and there was no way to extend it myself. Using it, I saw a bunch of boxes on the screen with tags appended to them – still useful, but not anything I would miss. However, if you do use Struts, I can see how this feature would be useful.
I ran into only one bug. If you leave a JSP tag uncompleted, it will fail with an error, but a completely different error that says it can’t compile the page due to a missing brace. This was easy enough to track down, but it was still disconcerting.
NitroX is giving their basic JSP editor away for free right now, apparently to drive up mindshare. The way they’ve implemented it is confusing, so I’ll go over it briefly: You download an evaluation version which has all the feature enabled. However, that version is only unlocked for 15 days. You can apply for a free license that will make the basic functionality enabled after the 15 days are up, but the advanced functionality is gone after 15 days. If you don’t get a free license inside of 15 days, I think the entire thing turns into a paperweight.
The way to get the free license and keep it working is as follows:
1. Download NitroX from here: http://www.m7.com/downloadNitroX.do
2. Go to the license page here: https://devclub.m7.com/getFreeJsp.do
3. Enter your personal information on the sidebar on the left. You won’t see a confirmation page, but that’s okay – they email you the license anyway.
The bottom line is that NitroX does what it says it does. It’s an editor that focuses on JSP and does it extremely well. There’s a bunch of stuff it doesn’t do, but it’s cheaper than IDEA, integrates well with Eclipse, and is reasonably fast and well designed.