What's New in NetBeans Platform 6.8?
An overview of changes relating to NetBeans Platform 6.8, which is the Swing framework that underpins applications such as NetBeans IDE.
Note: Click here for the previous release of this document.
New & Changed Features
Read all of the enhancements here, with the main new feature highlights as follows:
- Annotations. Continuing the trend from NetBeans Platform 6.7, several items can be registered via annotations. Below is the list of annotations introduced in NetBeans Platform 6.8:
- LayerBuilder. Each of the annotations above, as well as the others that the NetBeans Platform provides, generate registration tags at compile time, such as in your layer.xml file. In addition to using these predefined annotations, you can create your own, using the org.openide.filesystems.annotations.LayerBuilder class, which was introduced in NetBeans Platform 6.7 and enhanced in 6.8. For all the details, see the Javadoc for the new org.openide.filesystems.annotations package.
- ActionListeners for Context Aware Actions and Callback Actions. Where in recent releases, ActionListeners could be registered in the layer file as Always Enabled Actions, this is now also possible for other actions too. More details here.
- Declarative Asynchronous Actions. By adding a single attribute to an action registration in the layer file, you can let the action process asynchronously. In these cases, you therefore do not have to code an implementation of the NetBeans Platform's RequestProcessor class. More details here.
- SaveCookie. In previous releases, you needed to create a dummy node in order to work with SaveCookie, which is the interface for integrating with the NetBeans Platform's save functionality. Now, you don't. More details here. Note that we still have no satisfactory way of generalizing SaveAllAction.
- Programmatically Cause a Restart. Use LifecycleManager.markForRestart to restart an application after exiting. More details here.
- Support for Disabled Buttons. Create low color saturation icons for disabled buttons via the new ImageUtilities.createDisabledIcon and ImageUtilities.createDisabledImage.
- Enhanced Output Window APIs. Added API to have better control of text color and hyperlinks, which can be a big benefit to people using the Output Window. While in NetBeans Platform In 6.7 it was possible to control the color of whole lines, now you can use IOColorPrint.print() methods to do any coloring you want. Also, you can have several hyperlinks on a single line. More details here.
Enhancements to NetBeans IDE APIs
NetBeans IDE, the development tool created on top of the NetBeans Platform, underwent several changes in its APIs during the 6.8 timeframe.
- Common Server API. This API is under development. It lets you register server implementations, without the requirement that the server is an implementation of a Java EE specification. More details here.
- Diff API. Support for everything related to creation and visualization of diffs. This library lets you register various diff providers and visualizers and provides programmatic access to their functionality. More details here.
- Evaluator API. Evaluator service for a language that compiles into bytecode.
- Framework specification of web.xml requirement. Since Java EE 6 does not require web applications to have web.xml files, your framework implementations can specify whether a web application created on the framework requires one. More details here.
Deprecations
The following are deprecated/obsolete from 6.8 onwards:
- In the Options API, AdvancedOption and OptionsPanelController.createAdvanced are deprecated because these do not do anything you cannot do more easily using the annotations described above.
- In the Utilities API, Nodes API, and Actions API, you are recommended to not use SystemAction, CallableSystemAction, NodeAction, and CookieAction anymore. They will be deprecated in the future. Instead, you should use the declarative actions referred to above.
New Screencasts
The following screencasts are new in the 6.8 release cycle:
New Articles & Tutorials
The following are published for the first time in the 6.8 release cycle:
- How to Create a Swing CRUD Application on NetBeans Platform 6.8
- How to Split an Application into Modules?
- Integrated Property Editors in NetBeans
Work has started on translating a new NetBeans Platform book to English, which will be updated to NetBeans Platform 6.8.
Finally, the NetBeans Platform Showcase has been updated with many new screenshots of NetBeans Platform applications.
