Time for action – wiring a menu to a command with a handler
As with Eclipse 3.x, a command has an identifier and an associated handler class, which can be bound to menus. Unlike Eclipse 3.x, it is not specified in the plugin.xml
file; instead, it is specified in the Application.e4xmi
file.
- Open the
Application.e4xmi
file in thecom.packtpub.e4.application
project. - Navigate to the Application | Commands node in the tree, and click on Add child to add a new Command:
- ID:
com.packtpub.e4.application.command.hello
- Name:
helloCommand
- Description:
Says Hello
- ID:
- Create a class
HelloHandler
in thecom.packtpub.e4.application.handlers
package. It doesn't need to have ...
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.