A model fragment needs to be created to add commands and handlers into an E4 plug-in or application. This can be created with the E4 tools that are part of the default Eclipse repository for Eclipse Mars and Eclipse Neon, or can be installed from the E4 page for Luna and below versions.
Go to the Help | Install New Software… menu. For Eclipse Mars, Eclipse Neon and later, choose the http://download.eclipse.org/releases/neon/ site, substituting the platform name if necessary. For Eclipse Luna and below, choose the corresponding update site from the http://download.eclipse.org/e4/downloads/ page instead.
Type
e4 tools
into the search box and select the Eclipse e4 Tools feature:Click on Finish to continue installing the tools and restart Eclipse when prompted.
To verify that the tools have been installed correctly, select the
com.packtpub.e4.clock.ui
project, go to the File | New menu, and search fornew model fragment
. This should show an entry under...