/* * @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; }
/** * 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(); } }
/** * {@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(); }
/* * @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); }
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()); } } }
/** 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; }
/* (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(); }
/* * @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; } }
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; } }
public void dispose() { if (store != null) store.removePropertyChangeListener(this); }