コード例 #1
0
  /*
   * @see org.eclipse.jface.text.source.ISourceViewerExtension2#unconfigure()
   * @since 3.0
   */
  @Override
  public void unconfigure() {
    if (fOutlinePresenter != null) {
      fOutlinePresenter.uninstall();
      fOutlinePresenter = null;
    }
    if (fStructurePresenter != null) {
      fStructurePresenter.uninstall();
      fStructurePresenter = null;
    }
    if (fHierarchyPresenter != null) {
      fHierarchyPresenter.uninstall();
      fHierarchyPresenter = null;
    }
    if (fForegroundColor != null) {
      fForegroundColor.dispose();
      fForegroundColor = null;
    }
    if (fBackgroundColor != null) {
      fBackgroundColor.dispose();
      fBackgroundColor = null;
    }

    if (fPreferenceStore != null) fPreferenceStore.removePropertyChangeListener(this);

    super.unconfigure();

    fIsConfigured = false;
  }
コード例 #2
0
  /**
   * Sets the preference store on this viewer.
   *
   * @param store the preference store
   * @since 3.0
   */
  public void setPreferenceStore(IPreferenceStore store) {
    if (fIsConfigured && fPreferenceStore != null)
      fPreferenceStore.removePropertyChangeListener(this);

    fPreferenceStore = store;

    if (fIsConfigured && fPreferenceStore != null) {
      fPreferenceStore.addPropertyChangeListener(this);
      initializeViewerColors();
    }
  }
コード例 #3
0
 /**
  * {@inheritDoc}
  *
  * @see org.eclipse.ui.editors.text.TextEditor#dispose()
  */
 public void dispose() {
   if (outlinePage != null) {
     outlinePage.dispose();
   }
   IPreferenceStore preferenceStore = DFEditorActivator.getDefault().getPreferenceStore();
   preferenceStore.removePropertyChangeListener(this);
   outlinePage = null;
   dfPropModel = null;
   projectionSupport = null;
   super.dispose();
 }
コード例 #4
0
ファイル: HTMLMergeViewer.java プロジェクト: paxnil/spindle
  /*
   * @see org.eclipse.jface.viewers.ContentViewer#handleDispose(org.eclipse.swt.events.DisposeEvent)
   */
  protected void handleDispose(DisposeEvent event) {
    if (propertyChangeListener != null) {
      if (preferenceStore != null) {
        preferenceStore.removePropertyChangeListener(propertyChangeListener);
      }

      propertyChangeListener = null;
    }

    super.handleDispose(event);
  }
コード例 #5
0
ファイル: CustomFilters.java プロジェクト: Zagothal/Pydev
 public void propertyChange(PropertyChangeEvent event) {
   CustomFilters customFilters = weakCustomFilter.get();
   if (customFilters == null) {
     IPreferenceStore prefs = PydevPlugin.getDefault().getPreferenceStore();
     prefs.removePropertyChangeListener(this);
   } else {
     String property = event.getProperty();
     if (property.equals(PySetupCustomFilters.CUSTOM_FILTERS_PREFERENCE_NAME)) {
       customFilters.update((String) event.getNewValue());
     }
   }
 }
コード例 #6
0
  /** Uninstall the semantic highlighting */
  public void uninstall() {
    disable();

    if (fPreferenceStore != null) {
      fPreferenceStore.removePropertyChangeListener(this);
      fPreferenceStore = null;
    }

    fEditor = null;
    fSourceViewer = null;
    // fColorManager = null;
    fConfiguration = null;
    fPresentationReconciler = null;
  }
コード例 #7
0
  /* (non-Javadoc)
   * @see org.eclipse.ui.part.WorkbenchPart#dispose()
   */
  @Override
  public void dispose() {
    view.removeViewChangeListener(viewChangeListener);

    if (subsetHistory != null) {
      PropertyChangeSupport propertyChangeSupport =
          (PropertyChangeSupport) subsetHistory.getAdapter(PropertyChangeSupport.class);
      if (propertyChangeSupport != null) {
        propertyChangeSupport.removePropertyChangeListener(propertyChangeListener);
      }
    }

    if (UIActivator.getDefault() != null) {
      IPreferenceStore preferences = UIActivator.getDefault().getPreferenceStore();
      preferences.removePropertyChangeListener(preferenceChangeListener);
    }

    super.dispose();
  }
コード例 #8
0
 /*
  * @see org.eclipse.cdt.dsf.debug.internal.ui.disassembly.presentation.ISourcePresentationCreator#dispose()
  */
 public void dispose() {
   fViewer = null;
   fPresentation = null;
   if (fPreferenceStore != null) {
     fPreferenceStore.removePropertyChangeListener(this);
     fPreferenceStore = null;
   }
   if (fSourceViewerConfiguration != null) {
     fSourceViewerConfiguration.dispose();
     fSourceViewerConfiguration = null;
   }
   if (fSourceTagProvider != null) {
     if (fSourceTagListener != null) {
       fSourceTagProvider.removeSourceTagListener(fSourceTagListener);
       fSourceTagListener = null;
     }
     fSourceTagProvider = null;
   }
 }
コード例 #9
0
  public void stop(BundleContext context) throws Exception {

    IPreferenceStore ps = getPreferenceStore();
    rememberAliases(ps);
    if (fPropertyChangeListener != null) {
      ps.removePropertyChangeListener(fPropertyChangeListener);
      fPropertyChangeListener = null;
    }

    super.stop(context);

    if (fgDisposeOnShutdownImages != null) {
      Iterator i = fgDisposeOnShutdownImages.iterator();
      while (i.hasNext()) {
        Image img = (Image) i.next();
        if (!img.isDisposed()) img.dispose();
      }
      fgImages = null;
    }
  }
コード例 #10
0
 public void dispose() {
   if (store != null) store.removePropertyChangeListener(this);
 }