An overview of changes relating to NetBeans Platform 6.7, which is the Swing framework that underpins applications such as NetBeans IDE, as well as many others. (Click here for the 6.5 version of this document.)
New & Changed Features
- Annotations. Several items that you were required
to register in the layer.xml file can now
be registered via annotations instead. Below is the list
of annotations introduced in NetBeans Platform 6.7:
- @AntBasedProjectRegistration (see related blog entry)
- @ConvertAsProperties (see related blog entry)
- @NodeFactory.Registration (see related blog entry)
- @ServiceProvider (see related blog entry)
- @ServicesTabNodeRegistration (see related blog entry)
Where possible, you are recommended to use annotations instead of layer.xml registrations. Future releases of the NetBeans Platform will include additional annotations.
- Suite chaining. NetBeans Platform applications can now include modules that belong to other NetBeans Platform applications. As a result you can, for example, create a suite of modules that are common to all your applications, which can then reuse them. (See related blog entry.)
- Automatic resolution of excluded modules. Warnings about excluded modules that the application depends upon can now be resolved automatically in the Project Properties dialog of the NetBeans Platform application project type.
- Declarative MIME type resolution. Traditionally, the NetBeans Platform recognizes files based on their file extension or, in the case of XML files, by their root element. However, sometimes you may need to read the content of a file, via findMIMEType(FileObject) to properly determine a MIME type, such as in the case of PHP files. From NetBeans Platform 6.7, it is easier to resolve MIME types, as described here. As a result, the MIME type resolver for PHP files is now as follows. For details, see "How can I create declarative MIMEResolver and add new file type?
- More control over TopComponents. Per TopComponent, you can specify whether features such as maximizing, docking, and closing are supported. In NetBeans Platform 6.5, you were able to do this for the whole window system; now, you can do so per TopComponent, too.
- Improved Update Center support. Licenses in the AutoUpdate catalog have been removed, based on issue 149071. Though this enhancement is not directly visible to users, it makes the plugin catalogs reload much faster and consume far less memory than before.
- Improved toolbar support. The implementation of the toolbars
in the main window has been rewritten from scratch. Now the toolbars
behave better when the main window is being resized. It is also possible
to dock any toolbar to the right edge of the toolbar area in the main window, thanks
to a new version of the DTD for toolbar configurations:
<!-- Document Type Declaration for toolbar configuration xml files. -->
<!-- Root element of toolbar configuration. It's a list of Rows. -->
<!ELEMENT Configuration (Row+)>
<!-- Toolbar configuration row. It's a list of Toolbars. -->
<!ELEMENT Row (Toolbar*)>
<!-- Toolbar configuration Toolbar. It contains name of toolbar,
it's position and switch of toolbar visibility. -->
<!ELEMENT Toolbar EMPTY>
name CDATA #REQUIRED
visible (true | false) #IMPLIED
align (left | right) #IMPLIED
dragable (true | false) #IMPLIED
In the new DTD, shown above, which is version 1.1, the attributes "align" and "dragable" are new, while "position" has been removed. General information about toolbar configuration can be found here.
Read all of the changes here, with new/enhanced classes as follows:
- Parsing API. New API for parsing syntax and providing features, such as syntax coloring and code completion. See the New Language Support Tutorial.
- I/O APIs. Several enhancements that enable the Output window to be displayed in different positions, containing text with varying colors:
- Filesystems API. Several new classes and methods, enabling you to work more efficiently with files of any kind:
- Explorer & Property Sheet API.
CheckableNode is a new class that can be put into the Lookup of a Node, enabling you to display a checkbox next to the node in the display of explorer views that support it:
See related blog entry.
- UI Utilities API.
NotificationDisplayer. New class that creates and shows clickable notifications in the main status line:
See related blog entry.
- StatusDisplayer. Enhancement to this class, enabling you to set the 'importance' of a message in the status line. Messages set to a higher importance level will replace messages of lower importance. The most important messages stay visible permanently, until explicitly cleared or replaced. Previously, all status line messages were removed after some time.
The following are deprecated/obsolete from 6.7 onwards:
- Schliemann. The declarative language approach, also known as Schliemann, has been deprecated in favor of the more robust Parsing API. However, you are still able to use Schliemann, since it is part of the NetBeans IDE distribution. Note, though, that no more development of any kind will be done on Schliemann.
- Repository.getDefault().getDefaultFileSystem().getRoot(). Deprecated, replaced by FileUtil.getConfigRoot(). (Details.)
- Repository.getDefault().getDefaultFileSystem().findResource(String resource). Deprecated, replaced by FileUtil.getConfigFile(String file). (Details.)
New & Changed NetBeans Platform Tools in NetBeans IDE 6.7
- Project Properties Dialog.
- New "Add Project..." and "Add Cluster..." in the Libraries tab in the NetBeans Platform project type's Project Properties dialog. These enable "suite chaining", i.e., modules or groups of modules (clusters) can be added to an application via these buttons.
- New "Resolve" button to automatically resolve modules that have not been included, even though the application needs them.
- Contextual Menus. When you right-click on the project node of an application, a module suite, or a module, the "Share on Kenai" menu item lets you upload the project to a site on Kenai.
- New Window Component Wizard. When you use the New Window Component wizard, the "Basic Settings" step lets you indicate whether the TopComponent will be maximizable, closeable, etc. (See "More control over TopComponents" above.) On completion of the wizard, the related client property is added to the constructor of the generated TopComponent.
A Free NetBeans Platform Crash Course was released, to celebrate a brand new NetBeans Platform book by Heiko Boeck, translated by the NetBeans Platform community, entitled The Definitive Guide to NetBeans Platform.
A two-part series was introduced during this release cycle, focusing on the creation of a CRUD application on the NetBeans Platform:
- Part 1: Database Displayer
- Part 2: Database Editor (to come)
The introductory screencast series Top 10 NetBeans APIs was expanded to 9 parts.
All tutorials at http://www.netbeans.org/kb/trails/platform.html are updated. The following are published for the first time in the 6.7 release cycle:
- NetBeans Platform Quick Start
- NetBeans Platform CRUD Application Tutorial
- NetBeans Visual Library Tutorial for Java Applications
- NetBeans Wizard Module Tutorial
- New Language Support Tutorial