Package org.eclipse.jface.viewers

Examples of org.eclipse.jface.viewers.ISelectionProvider.removeSelectionChangedListener()


                    .getSelectionProvider();
            if (selectionProvider instanceof IPostSelectionProvider) {
                ((IPostSelectionProvider) selectionProvider)
                        .removePostSelectionChangedListener(editorListener);
            } else {
                selectionProvider.removeSelectionChangedListener(editorListener);
            }
            super.dispose();
        }

        @Override
View Full Code Here


     * @see ActionGroup#dispose()
     */
    @Override
    public void dispose() {
        final ISelectionProvider provider = fSite.getSelectionProvider();
        provider.removeSelectionChangedListener(fOpen);
        super.dispose();
    }

    private void setGlobalActionHandlers(final IActionBars actionBars) {
        actionBars.setGlobalActionHandler(IErlangEditorActionDefinitionIds.OPEN_EDITOR,
View Full Code Here

      fAstListeners.remove(listener);
      if (isEmpty()) {
        fPart.getEditorSite().getPage().removePostSelectionListener(fPostSelectionListener);
        ISelectionProvider selectionProvider= fPart.getSelectionProvider();
        if (selectionProvider != null)
          selectionProvider.removeSelectionChangedListener(fSelectionListener);
      }
    }
   
    /**
     * A selection event has occurred.
View Full Code Here

      pageSite.deactivate();

      // remove our selection listener
      ISelectionProvider provider = pageSite.getSelectionProvider();
      if (provider != null) {
        provider
            .removeSelectionChangedListener(selectionChangedListener);
        if (provider instanceof IPostSelectionProvider) {
          ((IPostSelectionProvider) provider)
              .removePostSelectionChangedListener(postSelectionListener);
        }
View Full Code Here

   */
  public void setSelectionProvider(ISelectionProvider provider) {
    ISelectionProvider oldSelectionProvider = selectionProvider;
    selectionProvider = provider;
    if (oldSelectionProvider != null) {
      oldSelectionProvider
          .removeSelectionChangedListener(getSelectionChangedListener());
      if (oldSelectionProvider instanceof IPostSelectionProvider) {
        ((IPostSelectionProvider) oldSelectionProvider)
            .removePostSelectionChangedListener(getPostSelectionChangedListener());
      }
View Full Code Here

    private void setPart(IWorkbenchPart part, boolean notify) {
        if (fPart != null) {
            // remove myself as a listener from the existing part
            ISelectionProvider sp = fPart.getSite().getSelectionProvider();
            if (sp != null) {
                sp.removeSelectionChangedListener(selectionListener);
                if (sp instanceof IPostSelectionProvider) {
          ((IPostSelectionProvider) sp)
                            .removePostSelectionChangedListener(postSelectionListener);
        } else {
          sp.removeSelectionChangedListener(postSelectionListener);
View Full Code Here

                sp.removeSelectionChangedListener(selectionListener);
                if (sp instanceof IPostSelectionProvider) {
          ((IPostSelectionProvider) sp)
                            .removePostSelectionChangedListener(postSelectionListener);
        } else {
          sp.removeSelectionChangedListener(postSelectionListener);
        }
            }
        }
        fPart = part;
        ISelection sel = null;
View Full Code Here

     */
    protected void unregisterSelectionListener(IWorkbenchPart aPart) {
        ISelectionProvider selectionProvider = aPart.getSite()
                .getSelectionProvider();
        if (selectionProvider != null) {
            selectionProvider.removeSelectionChangedListener(this);
        }
    }
}
View Full Code Here

            }
            // remove our selection listener
            if (pageSite != null) {
                ISelectionProvider provider = pageSite.getSelectionProvider();
                if (provider != null) {
                    provider.removeSelectionChangedListener(selectionChangedListener);
                    if (provider instanceof IPostSelectionProvider) {
                        ((IPostSelectionProvider) provider)
                                .removePostSelectionChangedListener(postSelectionListener);
                    }
                }
View Full Code Here

    fTextViewer.removeTextListener(this);

    ISelectionProvider selectionProvider= fTextViewer.getSelectionProvider();
    if (selectionProvider != null)
      selectionProvider.removeSelectionChangedListener(this);

    StyledText text= fTextViewer.getTextWidget();
    if (text != null) {
      text.removeMouseListener(this);
      text.removeFocusListener(this);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.