Eclipse 4.x applications use a
model fragment to define the UI. It is necessary to create a model fragment to define the part descriptors, handlers, and commands to simplify the code shown previously. To start with, the e4view
extension will be replaced by a part descriptor in the fragment.
Comment (or delete) the
e4view
extension from theplugin.xml
to prevent it from being loaded.Select the project, navigate to the File | New... menu, and choose New Model Fragment from the dialog.
In the newly opened
fragment.e4xmi
file, click on Model Fragments and click on Add to add a new fragment.Enter
org.eclipse.e4.legacy.ide.application
as the Extended Element ID anddescriptors
as the Feature Name.Select PartDescriptor from the drop-down menu and click on Add to add a new Part Descriptor with the following fields:
ID:
com.packtpub.e4.migration.views.SampleView
Label:
Sample View
Icon URI:
platform:/plugin/com.packtpub.e4.migration/icons/sample.gif
...