List of usage examples for org.eclipse.jface.commands ActionHandler dispose
@Override public final void dispose()
From source file:org.eclipse.jst.pagedesigner.editors.actions.DesignerStyleActionGroup.java
License:Open Source License
/** * dispose the action// w w w.j ava 2 s.c o m */ public void dispose() { for (final ActionHandler actionHandler : _actionHandlers) { actionHandler.dispose(); } }
From source file:org.eclipse.ui.internal.WorkbenchWindow.java
License:Open Source License
void registerGlobalAction(IAction globalAction) { String commandId = globalAction.getActionDefinitionId(); if (commandId != null) { final Object value = globalActionHandlersByCommandId.remove(commandId); if (value instanceof ActionHandler) { // This handler is about to get clobbered, so dispose it. final ActionHandler handler = (ActionHandler) value; handler.dispose(); }//from www. j a v a2s .co m if (globalAction instanceof CommandAction) { final String actionId = globalAction.getId(); if (actionId != null) { final IActionCommandMappingService mappingService = (IActionCommandMappingService) serviceLocator .getService(IActionCommandMappingService.class); mappingService.map(actionId, commandId); } } else { globalActionHandlersByCommandId.put(commandId, new ActionHandler(globalAction)); } } submitGlobalActions(); }