New & Cool in NetBeans Platform 7
By Geertjan-Oracle on Apr 21, 2011
The release notes can be found here. I asked the engineers working on the NetBeans Platform for the new features considered most significant. The list that resulted, a subset of the link above, is as follows:
- @Messages. Use the @Messages annotation and you'll not need to work with bundle files anymore. Read this blog entry for all the great reasons for using this annotation. Be careful, this particular annotation is addictive and will slowly take over your life. See the System Properties Tutorial for a full blown example that makes heavy use of this annotation.
- @TopComponent.\* Use the @TopComponent.\* annotations to register TopComponents in the window system. The annotations let you specify, among other things, the position and the default opened state of each window, as class-level annotations at the top of each TopComponent class. To try this out, use the "New Window Component" wizard and you'll end up with an annotated TopComponent class.
- @Action\*. Use the @Action\* annotations to bind Actions to menus, toolbars, keyboard shortcuts, and popups on the NetBeans Platform. To try these out, use the "New Action" wizard, which will (instead of creating entries in a layer file) create an Action class with annotations. See the NetBeans Platform Quick Start for a full blown example that uses these annotations a lot.
- @Mime\*. Use the @Mime\* annotations to bind features to MIME types. Read the NetBeans Zone article @MimeLocation, @MimeRegistration and @MimeRegistrations added for details.
- @HelpSetRegistration. Use @HelpSetRegistration to register helpsets in the central registry, i.e., no need to manually use a layer anymore, since at compile time the registration will be done for you thanks to this annotation. To see this in action, use the "JavaHelp Help Set" wizard in the IDE.
- Profiler integration with the NetBeans Platform. A subset of the Profiler has been added to the NetBeans Platform, enabling self-sampling, which is typically during the development phase. Visible evidence of this is the new Profile button in a deployed NetBeans Platform application.
- Better IconView. The IconView looked quite bad previously, each node was displayed very large and no visualization was shown for the selected node. Read here on NetBeans Zone how Aljoscha Rittner, a NetBeans Dream Team member, fixed this problem and contributed it to the NetBeans sources.
- Functional testing in Maven-based NetBeans Platform applications. Together with many enhancements in the Maven areas of NetBeans IDE, you can now refer to Functional Tests in a Maven-Based NetBeans Platform Application, since functional testing is now possible in Maven based NetBeans Platform applications. Also read about NbModuleSuite, since this is the key NetBeans API class used in this process.
- Network Settings API. A new API, described here by Jirka Rechtacek, the API's author, in his blog.
- New implementation of WeakSet with two new methods, 'putIfAbsent' and 'resize'. New method putIfAbsent gives access to key already stored in Set. Method resize allows to change capacity of internal hash map. Read about this here.
- New native library lookup mechanism. You can now distribute native libraries into architecture and OS specific directories under modules/lib. Read about this here.
- Better support for vi mode. Support for chunking edits via BEGIN_COMMIT_GROUP and END_COMMIT_GROUP. Read about this here.
Again, the full list of NetBeans Platform 7 changes can be found here.
Many of the NetBeans Platform tutorials have already been updated to NetBeans Platform 7, with many thanks to particularly Charles Bedon from NetCat for his involvement and the many reviews of the tutorials that he did. Other NetBeans Platform tutorials still need to be updated to 7.0 and this will occur during the coming weeks. A special focus will be placed on including the samples as downloads attached to each of the tutorials. Not all the samples in the New Project dialog have been updated yet, this should happen by the next release of NetBeans.
In addition to all of the above, quite a lot of NetBeans Platform training events have taken place in the past months. (I've personally traveled from Germany to Mexico City to Boston to Sweden to France in a matter of a few weeks recently.) Jesse Glick and Tim Boudreau were recently involved in training events too, as reported here, while Eppleton in Munich, Germany, led by NetBeans Dream Team member Toni Epple, now has a full blown classroom to cater to the growing demand for NetBeans Platform trainings there.
Let's also not forget to mention the various community contributions that assist work on the NetBeans Platform. On this front, I think first prize goes to the University of Southern Denmark in Odense, for Javeleon and Featureous. If you're using the NetBeans Platform and haven't checked out those two projects, you need to do so now, they're really great.
Finally, the NetBeans Platform 7.0 DZone Refcard has become available (sponsored by Eppleton), while a number of NetBeans Platform books are in the pipeline.