Over a million developers have joined DZone.

Eclipse 4 Goes the Extra Mile

DZone's Guide to

Eclipse 4 Goes the Extra Mile

· Java Zone ·
Free Resource

Get the Edge with a Professional Java IDE. 30-day free trial.

The Eclipse 4 development environment, codenamed "e4", just reached its second milestone.  The new milestone includes significant changes to the platform and the XML Windowing Toolkit (XWT) for the GUI.  XWT, a new feature in the fourth version of Eclipse, received a lot of attention in this milestone.

In the second milestone, it's easier to generate the TableViewer, ComboViewer, and ListViewer components responsible for data display.  For the JFace viewer declaration, the ILabelProvider and IContentProvider are no longer needed.  The JFace viewer now has a new class ViewerFilter for defining filters.

Here is code for the Table Viewer:
<TableViewer input="{Binding Path=employees}">
<TableViewerColumn width="150" text="Name" displayMemberPath="name"/>
<TableViewerColumn width="150" text="Age" displayMemberPath="age"/>
<GridData horizontalAlignment="FILL" grabExcessHorizontalSpace="true"/>

For each UI resource unit in XWT, a new IObservable management is implemented, allowing developers to take the IObservableValue and then modify observed values with automatic notifications in the UI and behind data.  

In milestone 2, XWT starts to implement transparent "Declarative Data Binding" to hide the complexity of JFace data binding.  The Eclipse programmers say the data binding mechanism is more user friendly than the classes and methods in the JFace Java GUI library.  Declarative Data Binding allows master/detail relationships to be displayed and it allows data models and business models to mix.

More operators have been added to XWT in milestone 2.  The table below shows the Condition and Trigger operators that have been added.

Operator Data type Description
EG Any Equal
NE Any Not equal
LT Number Less then
GT Number Great then
LE Number Less and equal
GE Number Great and equal
LIKE String String matching. * and ? are supported.
IS_A Any Tests if an instance is a type
IS_KIND_OF Type Tests if a type is same or a subclass of another.

In the second milestone of Eclipse 4, the new SaveablePart feature allows parts such as text fields to become saveable.  The enhanced e4 renderer will now display and update a part's 'dirty state' affordance while the underlying model changes.  Changing a vCard's details, for example, will cause the dirty affordance to appear in the part's tab.

The e4 workbench in milestone 2 supports multi-stroke keybindings, meaning a keybinding can be added to the workbench at the Window, Application, or Part.  The keybinding attaches a key sequence to a command.  Context injection in e4 supports annotations from the upcoming javax.inject package.  The internal injection processing now passes the open source annotation-based injection test suite at the JSR-330 homepage.  Eclipse 4 plans to support JSR-330 as a core feature.

The core UI code in e4 is now written against the 'data' layer, meaning the existing renders can still be used while allowing greater flexibility for the client's model containment management.  The UI model predefines a part-based containment model and a capture of the legacy IDE containment structure.  This new model facilitates cleaner use of generics.  Java tooling will now correctly flag elements added to invalid containers.

Finally, OpenSocial gadgets can now be opened as views in Eclipse.  Many social websites including iGoogle, LinkedIn, and MySpace, use the OpenSocial Gadgets API.  If your gadget is customizable, you can edit its preferences on a dedicated property page using the "View" menu.

The third milestone for Eclipse 4 is set for January, 2010.  The final milestone is expected in May.

Get the Java IDE that understands code & makes developing enjoyable. Level up your code with IntelliJ IDEA. Download the free trial.


Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}