Time for action – creating a model fragment
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 ...
Get Eclipse Plug-in Development Beginner's Guide - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.