This page describes the migration of NiCE from an Eclipse 3.7.2 RCP application to an Eclipse 4.2.2 application.
NiCE's Eclipse 4 plug-in is called gov.ornl.nice.client.e4.
There is no distinction between Editors and Views in Eclipse 4. Instead, only "Parts" are considered. (Recall that in Eclipse 3.x a Part was the base class for Editors and Views.) New parts, but not the SWT code that draw the contents of those parts, were created for NiCE's e4 port. PartSashContainers and PartStacks were created to replace the layout configured in the plugin.xml file from the 3.7.2 version. A horizontally split PartSashContainer was used as the base with the left containing a vertically split PartSashContainer with PartStacks to reproduce the vertical stacking of the ItemViewer and TransformationViewer. The same scheme was used on the right-side of the base container to reproduce the vertical stacking of the FormEditor space and the Console view.
It is important to note that fixing the width or height of a PartStack is done by the putting a number in the obsurely named "Container Data" field in the editor and that the weighting is done in thousands. So, to weight two parts that are vertically stacked in a PartSashContainer, one part must have Container Data set to 75000 and the other should have it set to 25000 instead of .75 and .25 or 75 and 25.
Handlers and Commands were added as needed to replace the 3.7.2 commands. The source code for these was directly transferred.
The following references were used for this work:
Eclipse 4 (e4) Tutorial from EclipseSource - http://eclipsesource.com/blogs/2012/05/10/eclipse-4-final-sprint-part-1-the-e4-application-model/ Eclipse 4 RCP - Tutorial from Lars Vogel - http://www.vogella.com/articles/EclipseRCP/article.html