Monday Jul 21, 2014


The recently held NetBeans Platform course in Leipzig has resulted in a very nice enhancement for the NetBeans Platform community. It can be read about here, by its author Daniel Koll, from Aachen:

TopComponentGroup mit Annotation

No worries if you don't understand German. All you need to understand is Java! 

To get started with this enhancement, do a checkout:

svn checkout svn:// topcomponentgroupregistration-code

You'll end up with a NetBeans module that defines a @TopComponentGroupRegistration, as follows.

public @interface TopComponentGroupRegistration
   * The module where the {@link TopComponent} is placed in, and where the Group will 
   * be placed in if it doesn't exist.
   * @return 
  public String module();
   * The specification Version of the {@link #module()}.
   * @return 
  public String specVersion() default "1.0";
   * The name of the Group, where this {@link TopComponent} will be placed.
   * @return 
  public String group();
   * Value of the open Flag, in the Group Configuration.
   * @return 
  public boolean open() default true;
   * Value of the close Flag, in the Group Configuration.
   * @return 
  public boolean close() default true;
   * Flag, if the Group should be opened at startup.
   * The real state of the group is calculated via an or to all 
   * of these Items.
   * @return 
  public boolean groupOpenState() default false;

There's also a LayerGeneratingProcessor included in the NetBeans module, to process the above. 

Copy both into a core module in your NetBeans Platform application, set the required dependencies (just copy them from the project.xml in the module) and then annotate your TopComponents as needed, as described by Daniel Koll.

Many thanks, this is very useful, and has qualified Daniel Koll as a NetBeans Platform Certified Engineer. This is a certification that is part of the NetBeans Platform Certified Training Course. Not only that, but Daniel has created another new feature, available as a plugin, ImportantFiles 4 JavaSE. Congratulations Daniel, looking forward to many more enhancements to NetBeans IDE!


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.


« July 2014 »