Original URL: http://www.theregister.co.uk/2006/01/11/intellij_idea_5_review/

IntelliJ IDEA 5.0: can it survive the Eclipse onslaught?

Sometimes less is more

By Tim Anderson

Posted in Developer, 11th January 2006 07:02 GMT

Review The rise and rise of Eclipse is a mixed blessing for developers. There are obvious benefits in the existence of such a high-quality tools platform, free and open source, and seemingly everyone bar Sun and Microsoft has signed up to use it. The downside is the pressure it puts on other independent tools vendors.

It is sad to see Borland’s excellent JBuilder becoming an Eclipse add-in, for example. In all this, IntelliJ IDEA from JetBrains is a notable survivor. IDEA is focused on the automation of common editing tasks. The trick here is to achieve features that improve productivity without being intrusive or annoying, and in this IDEA is remarkably successful.

Shows how IntelliJ IDEA uses modules to support different application types.

Features

IDEA is a code-centric editor characterized by two key features. The first is refactoring. IDEA was among the first IDEs to include refactoring tools, and remains particularly strong in this area, with an extensive list of refactoring, intelligent implementation, and clear documentation. For example, Safe Delete will delete a class or class member only if there are no usages. If there are usages, they are listed for inspection. More complex refactorings include Generify, which attempts to convert code to take advantage of Generics, introduced in Java 5.0, and to remove unnecessary casts. This edition of IDEA includes several new or enhanced refactorings, such as Move Method and Change Method Signature. Careful refactoring is a potent tool for making code more maintainable, and IDEA is the leader in the field.

This screenshot shows an IntelliJ IDEA refactoring wizard.

The other key feature of IDEA is called Intention Actions. JetBrains describes this as, “When IntelliJ IDEA considers that there is something wrong with your code, it suggests an Action to fix it.” For example, you might declare a JFrame before you have imported the relevant swing package. IDEA will pop up a suggestion, and pressing Alt + Enter adds the necessary import statement.

This screenshot shows an Intention Action at work.

This feature is not unique to IDEA. Eclipse has Quick Fix and JBuilder has Error Insight, both of which will also suggest an import in the example given. On the other hand, IDEA takes the concept further, with a huge range of Intention Actions including refactorings and EJB-specific actions as well as error corrections. They really do speed up coding, and are easy to ignore or disable when they are not needed.

If you have second thoughts about any changes, IDEA makes it easy to go back in time. It maintains local history in the background, and choosing Recent Changes from the View menu lists your main actions, with an option to rollback or view the detail in a difference editor. External version control systems are also supported. IDEA works particularly well with CVS and Subversion (new in version 5.0), but also integrates with Perforce, StarTeam and even Visual SourceSafe.

Alongside its editing features, IDEA is strong for static code analysis. It claims over 500 code inspections, 170 of which are new in this version. After running a code analysis, you can browse through the suggestions, complete with explanatory descriptions, and in many cases implement proposals with a single click.

This screenshot shows IDEA’s static code analysis.

In addition, code inspection takes place automatically when a file is open in the editor. IDEA displays any warnings or errors as coloured bars in the margin.

IDEA includes an innovative but unsatisfactory GUI designer. You are meant to design your form with XY layout, then group components into horizontal, vertical, or grid layouts. The final step is to apply a grid layout to the complete form. IDEA stores the form layout as XML, from which it generates Java code.

This sscreenshot shows the rather unsatisfactory GUI designer.

It works, but it can be awkward to get the exact layout you want, or to modify existing layouts. JBuilder’s two-way source code/designer integration is much preferable; as is the NetBeans GUI designer. In fact, even working purely with code is probably easier in the long run.

Roadmap Demetra

Major improvements to the GUI designer are promised for the next version of IDEA, code-named Demetra. New team collaboration features are also on the roadmap, along with EJB 3.0 support, WebSphere integration, and a visual Javaserver Faces designer. The roadmap for IDEA 6.0 is here.

Jetbrains has stepped up J2EE support in version 5.0 of IDEA, with special focus on the front-end. This means smart editing for JavaServer Pages, XML, HTML, CSS and Javascript, including new features in JSP 2.0. IDEA calls on the services of Xerces for XML validation. There is also coding help for EJB modules, and specific debugging and deployment support for Apache Tomcat and BEA WebLogic but not, curiously, for IBM’s WebSphere or the open source JBoss, although a JBoss plug-in is available.

IDEA is resource-hungry and needs a fast system with generous amounts of RAM. Sometimes there are noticeable pauses, presumably while the background parser catches up with your work, and users of earlier versions complain that version 5.0 is significantly slower than before. Another common gripe is weak documentation for the plug-in API.

Evaluating IDEA

IntelliJ IDEA has a loyal following, and it is easy to see why. Developers who spend most of their time coding set a high value on the myriad productivity tools. These take some time to learn, but the effort is soon repaid and IDEA enables you to work fast while maintaining high standards. However, if you are looking for such things as visual editors, modelling tools, code generation for XML web services, database tools, Struts designers, or J2EE frameworks, IDEA is not for you (although there are third-party plug-ins for some of these features). IDEA is for developers who live in the code.

The difficult question is how well IDEA will continue to survive the Eclipse onslaught. The Eclipse tools platform shares some of IDEA’s philosophy; especially its focus on refactoring. Eclipse also benefits from richer cross-industry support, with an array of sub-projects. Nevertheless, although Eclipse is not going away, those who discover IDEA still have reason to be satisfied. Sometimes less is more, and sharp single-company focus has advantages over a consortium of diverse groups pressed together. As a pure editor IDEA has the edge, and it is easier to learn and use, but it will inevitably feel the pressure as one company after another comes up with Eclipse-specific extensions. ®

Links

For more information about IDEA and an evaluation copy, see here.

New features in IDEA 5.0 are listed here.