當前位置: 首頁>>代碼示例>>Java>>正文


Java ICommandService.removeExecutionListener方法代碼示例

本文整理匯總了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();
}
 
開發者ID:apicloudcom,項目名稱:APICloud-Studio,代碼行數:26,代碼來源:ExecutionListenerRegistrant.java

示例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);
}
 
開發者ID:chgeo,項目名稱:show-shortcuts,代碼行數:18,代碼來源:Activator.java

示例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;
}
 
開發者ID:MulgaSoft,項目名稱:e4macs,代碼行數:17,代碼來源:MarkUtils.java

示例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);
    }
}
 
開發者ID:liaoziyang,項目名稱:ContentAssist,代碼行數:11,代碼來源:CommandExecutionManager.java

示例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;
	}
}
 
開發者ID:trylimits,項目名稱:Eclipse-Postfix-Code-Completion,代碼行數:13,代碼來源:CompoundEditExitStrategy.java

示例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);
		}
	}
}
 
開發者ID:chgeo,項目名稱:show-shortcuts,代碼行數:14,代碼來源:Activator.java

示例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);
}
 
開發者ID:MulgaSoft,項目名稱:e4macs,代碼行數:12,代碼來源:MetaXMinibuffer.java

示例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);
}
 
開發者ID:vitruv-tools,項目名稱:Vitruv,代碼行數:6,代碼來源:EclipseAdapterImpl.java


注:本文中的org.eclipse.ui.commands.ICommandService.removeExecutionListener方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。