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


Java ISelectionProvider.removeSelectionChangedListener方法代碼示例

本文整理匯總了Java中org.eclipse.jface.viewers.ISelectionProvider.removeSelectionChangedListener方法的典型用法代碼示例。如果您正苦於以下問題:Java ISelectionProvider.removeSelectionChangedListener方法的具體用法?Java ISelectionProvider.removeSelectionChangedListener怎麽用?Java ISelectionProvider.removeSelectionChangedListener使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.eclipse.jface.viewers.ISelectionProvider的用法示例。


在下文中一共展示了ISelectionProvider.removeSelectionChangedListener方法的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: setSelectionProvider

import org.eclipse.jface.viewers.ISelectionProvider; //導入方法依賴的package包/類
/**
 * The <code>MultiPageEditorSite</code> implementation of this <code>IWorkbenchPartSite</code> method remembers the
 * selection provider, and also hooks a listener on it, which calls <code>handleSelectionChanged</code> when a
 * selection changed event occurs.
 * 
 * @param provider
 *          The selection provider.
 * @see MultiPageEditorSite#handleSelectionChanged(SelectionChangedEvent)
 */
public void setSelectionProvider(ISelectionProvider provider) {
	ISelectionProvider oldSelectionProvider = selectionProvider;
	selectionProvider = provider;
	if (oldSelectionProvider != null) {
		oldSelectionProvider.removeSelectionChangedListener(getSelectionChangedListener());
		if (oldSelectionProvider instanceof IPostSelectionProvider) {
			((IPostSelectionProvider) oldSelectionProvider)
					.removePostSelectionChangedListener(getPostSelectionChangedListener());
		} else {
			oldSelectionProvider.removeSelectionChangedListener(getPostSelectionChangedListener());
		}
	}
	if (selectionProvider != null) {
		selectionProvider.addSelectionChangedListener(getSelectionChangedListener());
		if (selectionProvider instanceof IPostSelectionProvider) {
			((IPostSelectionProvider) selectionProvider).addPostSelectionChangedListener(getPostSelectionChangedListener());
		} else {
			selectionProvider.addSelectionChangedListener(getPostSelectionChangedListener());
		}
	}
}
 
開發者ID:OpenSoftwareSolutions,項目名稱:PDFReporter-Studio,代碼行數:31,代碼來源:MultiPageToolbarEditorSite.java

示例2: uninstall

import org.eclipse.jface.viewers.ISelectionProvider; //導入方法依賴的package包/類
/**
 * Removes this selection changed listener from the given selection
 * provider.
 *
 * @param selectionProvider
 *            the selection provider
 */
public void uninstall(ISelectionProvider selectionProvider) {
	if (selectionProvider == null)
		return;

	if (selectionProvider instanceof IPostSelectionProvider) {
		IPostSelectionProvider provider = (IPostSelectionProvider) selectionProvider;
		provider.removePostSelectionChangedListener(this);
	} else {
		selectionProvider.removeSelectionChangedListener(this);
	}
}
 
開發者ID:angelozerr,項目名稱:typescript.java,代碼行數:19,代碼來源:JavaScriptLightWeightEditor.java

示例3: deactivate

import org.eclipse.jface.viewers.ISelectionProvider; //導入方法依賴的package包/類
public void deactivate() {
	ISelectionProvider textSelectionProvider = textViewer.getSelectionProvider();
	if (textSelectionProvider instanceof IPostSelectionProvider)
		((IPostSelectionProvider) textSelectionProvider).removePostSelectionChangedListener(textListener);
	else
		textSelectionProvider.removeSelectionChangedListener(textListener);
	textListener = null;
	textViewer = null;
	treeViewer.removePostSelectionChangedListener(treeListener);
	treeViewer.removeDoubleClickListener(treeListener);
	treeViewer = null;
	treeListener = null;
	outlinePage = null;
}
 
開發者ID:cplutte,項目名稱:bts,代碼行數:15,代碼來源:OutlineWithEditorLinker.java

示例4: uninstallSelectionChangedListener

import org.eclipse.jface.viewers.ISelectionProvider; //導入方法依賴的package包/類
private void uninstallSelectionChangedListener() {
	ISelectionProvider selectionProvider = getSelectionProvider();
	if (selectionProvider != null) {
		if (selectionProvider instanceof IPostSelectionProvider) {
			final IPostSelectionProvider postSelectionProvider = (IPostSelectionProvider) selectionProvider;
			postSelectionProvider.removePostSelectionChangedListener(selectionChangedListener);
		} else {
			selectionProvider.removeSelectionChangedListener(selectionChangedListener);
		}
	}
}
 
開發者ID:cplutte,項目名稱:bts,代碼行數:12,代碼來源:XtextEditor.java

示例5: uninstall

import org.eclipse.jface.viewers.ISelectionProvider; //導入方法依賴的package包/類
public void uninstall(ISelectionProvider selectionProvider)
{
	if (selectionProvider == null)
	{
		return;
	}
	if (selectionProvider instanceof IPostSelectionProvider)
	{
		((IPostSelectionProvider) selectionProvider).removePostSelectionChangedListener(this);
	}
	else
	{
		selectionProvider.removeSelectionChangedListener(this);
	}
}
 
開發者ID:apicloudcom,項目名稱:APICloud-Studio,代碼行數:16,代碼來源:AbstractThemeableEditor.java

示例6: deactivate

import org.eclipse.jface.viewers.ISelectionProvider; //導入方法依賴的package包/類
@Override
public void deactivate ()
{
    this.activeEditor.removePropertyListener ( this );

    this.deleteAction.setActiveWorkbenchPart ( null );
    this.cutAction.setActiveWorkbenchPart ( null );
    this.copyAction.setActiveWorkbenchPart ( null );
    this.pasteAction.setActiveWorkbenchPart ( null );
    this.undoAction.setActiveWorkbenchPart ( null );
    this.redoAction.setActiveWorkbenchPart ( null );

    if ( this.loadResourceAction != null )
    {
        this.loadResourceAction.setActiveWorkbenchPart ( null );
    }

    if ( this.controlAction != null )
    {
        this.controlAction.setActiveWorkbenchPart ( null );
    }

    if ( this.validateAction != null )
    {
        this.validateAction.setActiveWorkbenchPart ( null );
    }

    final ISelectionProvider selectionProvider = this.activeEditorPart instanceof ISelectionProvider ? (ISelectionProvider)this.activeEditorPart : this.activeEditorPart.getSite ().getSelectionProvider ();

    if ( selectionProvider != null )
    {
        selectionProvider.removeSelectionChangedListener ( this.deleteAction );
        selectionProvider.removeSelectionChangedListener ( this.cutAction );
        selectionProvider.removeSelectionChangedListener ( this.copyAction );
        selectionProvider.removeSelectionChangedListener ( this.pasteAction );

        if ( this.validateAction != null )
        {
            selectionProvider.removeSelectionChangedListener ( this.validateAction );
        }

        if ( this.controlAction != null )
        {
            selectionProvider.removeSelectionChangedListener ( this.controlAction );
        }

        if ( this.saveAsAction != null )
        {
            selectionProvider.removeSelectionChangedListener ( this.saveAsAction );
        }
    }
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:53,代碼來源:ChartActionBarContributor.java

示例7: dispose

import org.eclipse.jface.viewers.ISelectionProvider; //導入方法依賴的package包/類
public void dispose() {
	ISelectionProvider provider= fSite.getSelectionProvider();
	provider.removeSelectionChangedListener(fOpen);
	super.dispose();
}
 
開發者ID:angelozerr,項目名稱:typescript.java,代碼行數:6,代碼來源:OpenEditorActionGroup.java

示例8: disposeAction

import org.eclipse.jface.viewers.ISelectionProvider; //導入方法依賴的package包/類
private void disposeAction(ISelectionChangedListener action, ISelectionProvider provider) {
	if (action != null)
		provider.removeSelectionChangedListener(action);
}
 
開發者ID:angelozerr,項目名稱:typescript.java,代碼行數:5,代碼來源:ReferencesSearchGroup.java

示例9: dispose

import org.eclipse.jface.viewers.ISelectionProvider; //導入方法依賴的package包/類
public void dispose() {
	ISelectionProvider provider = fSite.getSelectionProvider();
	provider.removeSelectionChangedListener(fOpen);
	super.dispose();
}
 
開發者ID:angelozerr,項目名稱:jsbuild-eclipse,代碼行數:6,代碼來源:OpenEditorActionGroup.java

示例10: dispose

import org.eclipse.jface.viewers.ISelectionProvider; //導入方法依賴的package包/類
@Override
public void dispose() {
  ISelectionProvider provider = site.getSelectionProvider();
  provider.removeSelectionChangedListener(openAction);
  super.dispose();
}
 
開發者ID:gwt-plugins,項目名稱:gwt-eclipse-plugin,代碼行數:7,代碼來源:GWTOpenEditorActionGroup.java

示例11: dispose

import org.eclipse.jface.viewers.ISelectionProvider; //導入方法依賴的package包/類
/**
 * {@link AbstractSelectionProviderValidator} overrides {@link #dispose()}
 * to remove the {@link ISelectionChangedListener} from the subject. If
 * subclasses override to perform their own cleanup, they must invoke
 * <code>super.dispose()</code>.
 */
@Override
public void dispose() {
    final ISelectionProvider subject = getSelectionProviderSubject();
    subject.removeSelectionChangedListener(selectionChangedListener);
}
 
開發者ID:Microsoft,項目名稱:team-explorer-everywhere,代碼行數:12,代碼來源:AbstractSelectionProviderValidator.java


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