Time for action – propagating selection
When the user selects an item in a viewer component, any registered selection listeners will be notified. In order to forward changes to the E4 selection service, a listener needs to be created to forward the selection to the ESelectionService
.
- Add the required packages to the bundle's package imports, by right-clicking on the
com.packtpub.e4.clock.ui
project and navigating to Plug-in Tools | Open Manifest to open the bundle's manifest. On the Dependencies tab, click on Add under the Imported Packages section and enterorg.eclipse.e4.ui.workbench.modeling
as well asorg.eclipse.e4.core.di.annotations
. - In order to forward selection changes to the E4 selection service, it must be injected into the view. Add ...
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.