In this interview with Artima, Gregg Sporar, Sun's NetBeans evangelist, explains why a new editor was needed, and how it benefits developer productivity:
In NetBeans 6.0, the main feature we wanted to address was a complete rewrite of the editor infrastructure. When you use an IDE, you spend the majority of your time in the code editor. The community told us that we needed these enhancements to be competitive with the editor features in other IDEs. We heard very loud and clear from the community that our editor had fallen behind. For the most part, with the 6.0 release, we wanted to get to parity with other editors. So the editor in NetBeans 6.0 is at least as capable as editors in other IDEs, and there might be a few cases where we have slightly better features.
Our main goal was to make the editor smarter, faster, and to make users more productive. One example of that is faster and smarter code completion. The new editor is more aware of the context in which you are working. For example, if you declare a variable in your Java application as an ArrayList
, and then on the right hand side of the equals sign you type new
and press control-space, the editor will bring up the possible class types that can be assigned to that variable, which will be ArrayList
and classes derived from ArrayList
. In NetBeans 5.5, the list the editor shows includes the entire set of possible classes available on the classpath, with the most likely candidates mixed in with the rest in alphabetical order. In 6.0, the most likely candidates are listed at the top of the list.
There are many other things, too, that we wanted for a long time in the editor. For example, when creating the constructor of a class, we needed something that took all the parameters required to initialize the class and then automatically instantiate from those parameters instance variables of the class. Then there is also the ability to quickly and efficiently generate standard, boiler-plate methods of a Java class, such as the equals()
or hashCode()
methods. And we can also do things like highlighting all occurrences of a variable just by moving the cursor over a variable name.
In addition, the editor can now also provide quick refactorings without your fingers ever having to leave the keyboard. For example, if you have a method call and pass in, say, a String parameter just between standard double-quotes, you can select that String literal, press alt-enter. One of the refactoring options shown will let you, say, convert that String literal to a static final variable.
One of the things that the re-written editor allowed us to do was add cutting-edge support for other languages besides Java. The best example of that in 6.0 is support for Ruby. There's been a lot of activities in the developer world around Rails, and we wanted to be able to provide a set of tools for those folks interested in Ruby, and the editor infrastructure was one of the things that made that possible.
Going forward, what you'll see is continued improvement of the editor features. Second, going beyond that base, we want to improve our support for JavaScript, we're already working on adding support for PHP, and NetBeans will increasingly become a tool for working with many languages. Support for some other languages is coming from the community, too, besides Sun. One user is working on Erlang support, and another one on Scala support.
What do you think of NetBeans 6.0's editor features? What language would you like to see support for in NetBeans next?