Search in sources :

Example 1 with IActionSetsListener

use of org.eclipse.ui.internal.menus.IActionSetsListener in project eclipse.platform.ui by eclipse-platform.

the class WorkbenchWindow method fireActionSetsChanged.

private final void fireActionSetsChanged() {
    if (actionSetListeners != null) {
        for (Object listener : actionSetListeners.getListeners()) {
            final IActionSetsListener actionSetsListener = (IActionSetsListener) listener;
            final WorkbenchPage currentPage = (WorkbenchPage) getActivePage();
            final IActionSetDescriptor[] newActionSets;
            if (currentPage == null) {
                newActionSets = null;
            } else {
                newActionSets = currentPage.getActionSets();
            }
            final ActionSetsEvent event = new ActionSetsEvent(newActionSets);
            actionSetsListener.actionSetsChanged(event);
        }
    }
}
Also used : IWorkbenchPage(org.eclipse.ui.IWorkbenchPage) EObject(org.eclipse.emf.ecore.EObject) IActionSetsListener(org.eclipse.ui.internal.menus.IActionSetsListener) IActionSetDescriptor(org.eclipse.ui.internal.registry.IActionSetDescriptor)

Aggregations

EObject (org.eclipse.emf.ecore.EObject)1 IWorkbenchPage (org.eclipse.ui.IWorkbenchPage)1 IActionSetsListener (org.eclipse.ui.internal.menus.IActionSetsListener)1 IActionSetDescriptor (org.eclipse.ui.internal.registry.IActionSetDescriptor)1