public void removeSelectionChangedListener(final ISelectionChangedListener listener) {
    final SelectionListenerAdapter adapter = m_adapters.get(listener);

    if (adapter != null) {
      m_selectionService.removeSelectionListener(adapter);
      m_adapters.remove(listener);
    }
  }
  @Override
  public void dispose() {
    // on disposal remove the selection listener
    ISelectionService s = getSite().getWorkbenchWindow().getSelectionService();
    s.removeSelectionListener(selectionListener);

    super.dispose();
  }
Exemplo n.º 3
0
 private void removeSelectionListener() {
   ISelectionService service = getSite().getWorkbenchWindow().getSelectionService();
   service.removeSelectionListener(this.selectionListener);
 }