HomeDigital EditionSys-Con RadioSearch Java Cd
Advanced Java AWT Book Reviews/Excerpts Client Server Corba Editorials Embedded Java Enterprise Java IDE's Industry Watch Integration Interviews Java Applet Java & Databases Java & Web Services Java Fundamentals Java Native Interface Java Servlets Java Beans J2ME Libraries .NET Object Orientation Observations/IMHO Product Reviews Scalability & Performance Security Server Side Source Code Straight Talking Swing Threads Using Java with others Wireless XML

I must admit, until recently my idea of an integrated development environment was Emacs, a couple of shell windows, and a six-pack of Dr. Pepper. I had nothing against IDEs, in fact I was all for them, I just couldn't find one that worked for me, instead of the other way around. Everything I tried either didn't format code the way I liked, required the entire development team to convert to it, didn't run my build scripts, wouldn't talk to my source code control system, or otherwise forced me to bend to its will. Maybe I'm too picky, but hey ­ I like to do things my way.

For the past several months, however, I've been developing almost exclusively with various beta builds of IntelliJ IDEA 3.0. It still has some bugs, of course, but this new IDE is so spectacular that even in its preproduction state I can't imagine coding without it. I introduced a few co-workers to the software to hear their opinions, knowing each of them already had established their own favorites ­ NetBeans, Forte, JBuilder, JRun Studio, and Visual J++. They're all using IDEA 3.0 now.

IntelliJ IDEA 3.0
JetBrains, Inc. (formerly IntelliJ Software), is based in Prague, Czech Republic, and St. Petersburg, Russia. They have released a number of successful Java development tools, most notably their Java IDE, IntelliJ IDEA. The latest version, 3.0, is scheduled for release this fall and will include some major enhancements, such as full JSP/EJB support, integration with Ant and JUnit, XML support, and a rich plug-in API for developing extensions. Like IDEA 2.5, IDEA 3.0 includes support for macros and code generation shortcuts, all dramatically improved. Of course, all the basics are there as well ­ a nice debugger, code completion, searching, replacing, code formatting, syntax/error highlighting, and source code control system integration. The popup code completion and JavaDoc hints are first rate, and super easy to use and configure. I'm finding new features every day and, unfortunately, it's impossible to cover all the goodies in one article.

Notably absent from the feature list are GUI builder tools like the ones found in NetBeans and other IDEs. While there's plenty of room for discussion regarding the vices and virtues of GUI builders, it's an important distinction worth noting for those who find them useful.

The IDE itself is written in Java and, unlike Eclipse, uses Swing for the GUI. While complex Swing applications tend to suffer from Java's overhead, IDEA's interface is fast and responsive, even on a mid-level machine. It even behaves well with large projects with thousands of source files. The software should run on any platform with JDK 1.4 installed (a JDK 1.3­compatible version is planned), but the primary supported platforms are Windows, Mac OS, and Linux.

Figure 1 shows a typical shot of IDEA 3.0 in action. The interface should be comfortably familiar to anyone who has used an IDE before; nothing radical here. Apart from a toolbar and menu selections, IDEA 3.0 uses a series of tool windows that dock along the margins to provide access to such things as code structure, compilation messages, and debugging stack frames. These windows can be moved around and displayed however you see fit. You can dock them, float them, make them slide in and out over your main window, and make them hide themselves when not needed.

Figure 1
Figure 1

As with most IDEs, you work on code as part of a project. A project includes your classpath, pointers to your source files, and build and run targets. Each project you define is stored as an XML file to keep on your local file system. One of IDEA's strong points is that it doesn't force you to set up your code structure any particular way, nor does it force you to use its internal build engine to compile. It's perfectly happy to call out to Ant to perform the build, for example. You can even choose to store source and library-path references relative to the project file, making it easy to share a project file with a team of developers or between machines.

Flexibility Is the Key to Happiness
IDEA 3.0 is as flexible as a three-legged rubber monkey. It's like no other IDE (or any other tool for that matter) I've encountered. You can customize everything about this program ­ from code formatting, syntax coloring, imports organization, and error highlighting to how your windows and tool bars are oriented. Perfect for particular programmers like myself!

Take the issue of spacing in your code. Unlike other IDEs that offer two or three spacing choices, IDEA 3.0 gives you literally dozens of options. As you can see in Figure 2, you can control every nuance of your code spacing style. Similar options are provided for controlling how braces, blank lines, and other stylistic choices are handled.

Figure 2
Figure 2

Your formatting options can be applied selectively to a section of code, an entire file, or even all the files in your project or directory. When you cut and paste code in the editor window, IDEA automatically formats the code appropriately, including inserting appropriate indentions and keeping everything nice and neat. IDEA's flexibility doesn't end at source-code formatting, of course. You can control the positioning of all the tool windows, the various aspects of code completion, coloring, and the entire collection of hot keys.

Refactoring Support
IDEA 3.0 would be an excellent IDE even if its flexible configuration and ease of use were its greatest assets. Its support for code refactoring is by far the most exciting feature. Refactoring, the process of continually improving your code and its structure, is one of those things that we all know is important, but we tend to slack off because it can be a pain to reorganize our code and class structure without breaking everything. Not so with IDEA. It supports many of the refactoring patterns discussed in Martin Fowler's seminal work on the subject, Refactoring. Some of the capabilities include:

  • Changing a method's signature to include new arguments
  • Renaming or moving classes, methods, and members
  • Extracting selected items from a class into a new interface
  • Introducing a variable from a selected expression
  • Encapsulating field references into a method
  • Pulling members up into a super class
IDEA makes it trivial to rename a class or move it to another package. Not only does it make the necessary changes to the code, it tracks down and corrects all the references to the class in Java code, import statements, JSP scriptlets, even Javadoc comments and XML files (like your Struts config file). In addition, it removes the old file from your version control system and adds the new one. It's so seamless that you don't think twice about moving a method from one class to another or reorganizing package structure as your project evolves. This is the first time we have such powerful tools in such a reasonably priced IDE.

J2EE Support
IDEA is way ahead of the game in terms of supporting JSP and EJB development. Most IDEs stop at syntax highlighting for JSPs, but IDEA adds much more. It allows you to define the roots of your Web applications in your source tree, providing internal awareness of your tag libraries, classpaths, and other properties. It can then perform code completion on JSP tags, bean properties, and even the file path include statements. It highlights Java errors in scriptlets and complains about invalid object references just as it does with Java source code. It generates EJB interfaces and allows full refactoring of them as well. JetBrains also promises integrated JSP and EJB debugging in the final release, but it was not yet available at the time of this writing.

I feel as if I haven't scratched the surface of everything this IDE can do and how well it does it. Overall, I'm very impressed by this as of yet unreleased product. Beginners will appreciate its good, easy-to-use editor, code completion, version-control system integration, and flexible configuration options, while advanced users will marvel at its seamless support for powerful refactoring operations and its rich plug-in API. Developers who are used to code wizards and GUI builders may be disappointed, however, as this tool does not attempt to address these areas.

Everything is wrapped up into a nice, reasonably priced package that most development shops should actually be able to afford. IntelliJ IDEA 3.0 will be available this fall.

Product Snapshot

  • Target Audience: Java and JSP programmers
  • Level: Beginner to advanced
  • Pros: Flexible code formatting and interface, extensible API, first-class J2EE support, powerful code generation, Ant and JUnit support
  • Cons: Limited support for non-Java source files, no GUI builder

    JetBrains, Inc.
    (formerly IntelliJ Software)
    Klanova 9/506
    14700 Prague
    Czech Republic
    Web: www.intellij.com/jetbrains/
    Phone: +7 (812) 380-1641
    Fax: +7 (812) 380-1643
    E-mail: [email protected]

    Windows, Mac, Linux, other JDK 1.3 platforms

    $395 (quantity discounts available)

    Test Platforms

  • AMD 1.33GHz, 784MB of RAM, Windows XP
  • 700MHz Intel Pentium, 256MB of RAM, Windows 2000

    Reviewed by
    Duane Fields [email protected]

    All Rights Reserved
    Copyright ©  2004 SYS-CON Media, Inc.
      E-mail: [email protected]

    Java and Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. SYS-CON Publications, Inc. is independent of Sun Microsystems, Inc.