New & Cool in NetBeans Platform 7

Together with NetBeans IDE 7, the latest & greatest release of the world's only modular Swing application framework, the NetBeans Platform, has also been pushed out the door.

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.

Comments:

[Trackback] Mit erscheinen der Version 7 der NetBeans Plattform sind auch einige neue Annotations hinzugekommen. Es scheint als würden die NetBeans Entwickler so langsam das Potential dieses Programmierkonstruktes nutzen wollen. Mit allen Konsequenzen. Eine dieser...

Posted by Java Getriebe on April 22, 2011 at 10:04 PM PDT #

Hi, Geertjan--hope you're doing well! If I understand NetBeans Platform annotations correctly, they serve to replace equivalent entries in a module's layer.xml file. Is there a way to see the equivalent layer entries that are generated when I use annotations like @ActionID and @ActionReferences? I tried adding an empty layer and accessing the "<this layer in context>" node, but it doesn't seem to show the actions that were added using annoations.

Posted by Eirik Bakke on December 17, 2012 at 10:16 AM PST #

Hi Eirik! To see the layer entries generated by the NetBeans annotation processor, go to the Files window (after you have built the module) and then look in the "build" folder, where you'll find a file named "generated-layer.xml".

Posted by Geertjan on December 18, 2012 at 02:54 AM PST #

I'm attempting to use Bundle-related annotations in NB 7.2.

However, when I try using a wrapper module that encapsulates jboss-client.jar from JBoss AS 7.1.3.Final, I get an error saying the symbol Bundle could not be found when creating a top component in a module dependent on said wrapper.

I notice that AS 7.1.3.Final's jboss-client.jar is registering org.jboss.logging.processor.apt.LoggingToolsProcessor as an annotation processor via META-INF.services. This AP is interfering with NbBundleProcessor.

Is manually removing javax.annotation.processing.Processor from that jar 's META-INF.services package the only way of working around this?

Posted by guest on January 27, 2013 at 07:52 PM PST #

Is it possible to have multiple annotations for one class? Say for instance you wanted to create undo and redo actions(this is just an example), could they be registered at the same place with the actions performed in the same class. What are possible ways to achieve what I wanted?

Posted by guest on June 28, 2013 at 08:54 AM PDT #

OK, I got the solutions following this tutorial you guys presented: https://platform.netbeans.org/tutorials/nbm-google.html

Posted by guest on June 29, 2013 at 08:39 PM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Geertjan Wielenga (@geertjanw) is a Principal Product Manager in the Oracle Developer Tools group living & working in Amsterdam. He is a Java technology enthusiast, evangelist, trainer, speaker, and writer. He blogs here daily.

The focus of this blog is mostly on NetBeans (a development tool primarily for Java programmers), with an occasional reference to NetBeans, and sometimes diverging to topics relating to NetBeans. And then there are days when NetBeans is mentioned, just for a change.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
12
13
14
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today