Time for action – creating a pop-up menu and a view menu

Pop-up and view menus are defined declaratively in the Application.e4xmi file. These are specific to a part, so the option is defined underneath the part declaration.

  1. Open the Application.e4xmi file.
  2. Navigate to the Application | Windows and Dialogs | Trimmed Window | Controls | Perspective Stack | Perspective | Controls | PartSashContainer | Part Stack | Part (Hello) | Menus node.
  3. Right-click on the Menus node and choose Add child | Popup Menu. Set the ID to com.packtpub.e4.application.popupmenu.hello, which will be used in code later.
    Time for action – creating a pop-up menu and a view menu
  4. Right-click on the Popup Menu and choose Add child | Handled ...

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.