/* * (non-Javadoc) * * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) */ @Override public void stop(final BundleContext context) throws Exception { Activator.plugin = null; // we remove the listener on the command service final ICommandService service = (ICommandService) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getService(ICommandService.class); service.removeExecutionListener(this.commandServiceListener); super.stop(context); }
public void stopMonitoring() { ICommandService commandService = getCommandService(); if (commandService != null) commandService.removeExecutionListener(executionListener); commandToBundleIdMapper.dispose(); }