本文整理匯總了Java中org.eclipse.ui.commands.ICommandService.removeExecutionListener方法的典型用法代碼示例。如果您正苦於以下問題:Java ICommandService.removeExecutionListener方法的具體用法?Java ICommandService.removeExecutionListener怎麽用?Java ICommandService.removeExecutionListener使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.eclipse.ui.commands.ICommandService
的用法示例。
在下文中一共展示了ICommandService.removeExecutionListener方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: tearDown
import org.eclipse.ui.commands.ICommandService; //導入方法依賴的package包/類
/**
* tearDown
*/
private void tearDown()
{
// stop listening for visibility events
BundleManager manager = BundleManager.getInstance();
manager.removeElementVisibilityListener(this);
// stop listening for execution events
Object service = PlatformUI.getWorkbench().getService(ICommandService.class);
if (service instanceof ICommandService)
{
ICommandService commandService = (ICommandService) service;
commandService.removeExecutionListener(this);
}
// drop all references
this._commandToIdsMap.clear();
this._idToCommandsMap.clear();
this._nonlimitedCommands.clear();
}
示例2: stop
import org.eclipse.ui.commands.ICommandService; //導入方法依賴的package包/類
@Override
public void stop(BundleContext context) throws Exception {
getPreferenceStore().removePropertyChangeListener(plugin);
ICommandService cmdService = (ICommandService) getWorkbench().getService(ICommandService.class);
if (cmdService != null) {
cmdService.removeExecutionListener(plugin);
}
closePopup();
debugTrace = null;
debug = false;
plugin = null;
super.stop(context);
}
示例3: removeExecutionListeners
import org.eclipse.ui.commands.ICommandService; //導入方法依賴的package包/類
private static void removeExecutionListeners(ITextEditor editor) {
ICommandService ics = (ICommandService) editor.getSite().getService(ICommandService.class);
if (ics != null) {
if (execExecListener != null) {
ics.removeExecutionListener(execExecListener);
}
if (copyCmdExecListener != null) {
Command com = ics.getCommand(EMP_COPY);
if (com != null) {
com.removeExecutionListener(copyCmdExecListener);
}
}
}
copyCmdExecListener = null;
execExecListener = null;
}
示例4: unregister
import org.eclipse.ui.commands.ICommandService; //導入方法依賴的package包/類
/**
* Unregisters a command manager with the command service of the workbench.
* @param cm the command manager
*/
public static void unregister(CommandExecutionManager cm) {
ICommandService cs = (ICommandService)PlatformUI.getWorkbench().getService(ICommandService.class);
if (cs != null) {
cs.removeExecutionListener(cm);
}
}
示例5: removeListeners
import org.eclipse.ui.commands.ICommandService; //導入方法依賴的package包/類
private void removeListeners() {
ICommandService commandService = (ICommandService)PlatformUI.getWorkbench().getAdapter(ICommandService.class);
if (commandService != null)
commandService.removeExecutionListener(fEventListener);
if (fWidgetEventSource != null) {
fWidgetEventSource.removeFocusListener(fEventListener);
fWidgetEventSource.removeMouseListener(fEventListener);
fWidgetEventSource.removeVerifyKeyListener(fEventListener);
fWidgetEventSource= null;
}
}
示例6: propertyChange
import org.eclipse.ui.commands.ICommandService; //導入方法依賴的package包/類
@Override
public void propertyChange(PropertyChangeEvent event) {
String property = event.getProperty();
if (ShortcutPreferenceInitializer.PREF_KEY_SHORTCUTS_ENABLED.equals(property)
|| ShortcutPreferenceInitializer.PREF_KEY_MOUSE_TRIGGER_ENABLED.equals(property)) {
ICommandService cmdService = (ICommandService) getWorkbench().getService(ICommandService.class);
if (isEnabled()) {
cmdService.addExecutionListener(plugin);
} else {
cmdService.removeExecutionListener(plugin);
}
}
}
示例7: removeOtherListeners
import org.eclipse.ui.commands.ICommandService; //導入方法依賴的package包/類
/**
* @see com.mulgasoft.emacsplus.minibuffer.CompletionMinibuffer#removeOtherListeners(IWorkbenchPage, ISourceViewer, StyledText)
*/
@Override
protected void removeOtherListeners(IWorkbenchPage page, ISourceViewer viewer, StyledText widget) {
ICommandService commandService = (ICommandService) PlatformUI.getWorkbench().getAdapter(ICommandService.class);
if (commandService != null) {
commandService.removeExecutionListener(this);
}
super.removeOtherListeners(page, viewer, widget);
}
示例8: removeCommandServiceListener
import org.eclipse.ui.commands.ICommandService; //導入方法依賴的package包/類
@Override
public void removeCommandServiceListener(IExecutionListener iel) {
final ICommandService service = (ICommandService) PlatformUI.getWorkbench().getService(ICommandService.class);
service.removeExecutionListener(iel);
}