本文整理匯總了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());
}
}
}
示例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);
}
}
示例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;
}
示例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);
}
}
}
示例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);
}
}
示例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 );
}
}
}
示例7: dispose
import org.eclipse.jface.viewers.ISelectionProvider; //導入方法依賴的package包/類
public void dispose() {
ISelectionProvider provider= fSite.getSelectionProvider();
provider.removeSelectionChangedListener(fOpen);
super.dispose();
}
示例8: disposeAction
import org.eclipse.jface.viewers.ISelectionProvider; //導入方法依賴的package包/類
private void disposeAction(ISelectionChangedListener action, ISelectionProvider provider) {
if (action != null)
provider.removeSelectionChangedListener(action);
}
示例9: dispose
import org.eclipse.jface.viewers.ISelectionProvider; //導入方法依賴的package包/類
public void dispose() {
ISelectionProvider provider = fSite.getSelectionProvider();
provider.removeSelectionChangedListener(fOpen);
super.dispose();
}
示例10: dispose
import org.eclipse.jface.viewers.ISelectionProvider; //導入方法依賴的package包/類
@Override
public void dispose() {
ISelectionProvider provider = site.getSelectionProvider();
provider.removeSelectionChangedListener(openAction);
super.dispose();
}
示例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);
}