Java Code Examples for org.eclipse.jface.preference.IPreferenceStore#removePropertyChangeListener()

The following examples show how to use org.eclipse.jface.preference.IPreferenceStore#removePropertyChangeListener() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FindBarDecorator.java    From APICloud-Studio with GNU General Public License v3.0 6 votes vote down vote up
public void dispose()
{
	findBarVisibilityControl.unregister(this);
	IPreferenceStore preferenceStore = FindBarPlugin.getDefault().getPreferenceStore();
	preferenceStore.removePropertyChangeListener(fFindBarActionOnPropertyChange);
	fOriginalFindBarAction = null;
	if (fStringNotFoundColor != null)
	{
		fStringNotFoundColor.dispose();
		fStringNotFoundColor = null;
	}
	for (FindBarOption opt : this.fFindBarOptions)
	{
		opt.dispose();
	}
	findBarEntriesHelper.unregister(entriesControlHandles);
	entriesControlHandles.clear();

	if (sourceViewer.getTextWidget() != null && !sourceViewer.getTextWidget().isDisposed())
	{
		sourceViewer.getTextWidget().removeFocusListener(textViewerFocusListener);
	}
}
 
Example 2
Source File: AbstractSyntaxColoringPage.java    From birt with Eclipse Public License 1.0 6 votes vote down vote up
public void dispose() {
	if (fForegroundColor != null) {
		fForegroundColor.dispose();
		fForegroundColor = null;
	}
	if (fBackgroundColor != null) {
		fBackgroundColor.dispose();
		fBackgroundColor = null;
	}
	if (fSelectionForegroundColor != null) {
		fSelectionForegroundColor.dispose();
		fSelectionForegroundColor = null;
	}
	if (fSelectionBackgroundColor != null) {
		fSelectionBackgroundColor.dispose();
		fSelectionBackgroundColor = null;
	}
	if (fListener != null) {
		final IPreferenceStore store = EditorsUI.getPreferenceStore();
		if (store != null) {
			store.removePropertyChangeListener(fListener);
		}
	}
	super.dispose();
}
 
Example 3
Source File: AnnotationEditor.java    From uima-uimaj with Apache License 2.0 6 votes vote down vote up
@Override
public void dispose() {
  // remove selection listener
  getSite().getWorkbenchWindow().getSelectionService().removeSelectionListener(this);

  getSite().getPage().removeSelectionListener(this);

  ICasDocument document = getDocument();

  if (document != null) {
    document.removeChangeListener(mAnnotationSynchronizer);
  }

  CasDocumentProvider provider = getCasDocumentProvider();
  
  if (provider != null) {
    IPreferenceStore store = provider.getTypeSystemPreferenceStore(getEditorInput());
    if (store != null)
      store.removePropertyChangeListener(mAnnotationStyleListener);
  }
  
  if (preferenceStoreChangeListener != null)
    CasEditorPlugin.getDefault().getPreferenceStore().removePropertyChangeListener(preferenceStoreChangeListener);
  
  super.dispose();
}
 
Example 4
Source File: RenamingPreferencePage.java    From MergeProcessor with Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
public void dispose() {
	super.dispose();
	final IPreferenceStore preferenceStore = Activator.getDefault().getPreferenceStore();
	preferenceStore.removePropertyChangeListener(propertyChangeListener);
}
 
Example 5
Source File: DotnetNewWizardPage.java    From aCute with Eclipse Public License 2.0 5 votes vote down vote up
@Override
public void dispose() {
	super.dispose();
	this.linkImage.dispose();
	if (updateTemplatesListener != null){
		IPreferenceStore store = AcutePlugin.getDefault().getPreferenceStore();
		store.removePropertyChangeListener(updateTemplatesListener);
	}
}
 
Example 6
Source File: ValidateableOverridesSectionPart.java    From tlaplus with MIT License 5 votes vote down vote up
@Override
public void dispose() {
	final IPreferenceStore ips = TLCUIActivator.getDefault().getPreferenceStore();
	ips.removePropertyChangeListener(m_preferenceChangeListener);
	
	super.dispose();
}
 
Example 7
Source File: FindBarOption.java    From APICloud-Studio with GNU General Public License v3.0 5 votes vote down vote up
public void dispose()
{
	if (fPropertyChangeListener != null)
	{
		IPreferenceStore preferenceStore = FindBarPlugin.getDefault().getPreferenceStore();
		preferenceStore.removePropertyChangeListener(fPropertyChangeListener);
		fPropertyChangeListener = null;
	}
}
 
Example 8
Source File: CustomFilters.java    From Pydev with Eclipse Public License 1.0 5 votes vote down vote up
@Override
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());
        }
    }
}
 
Example 9
Source File: AnnotationStyleViewPage.java    From uima-uimaj with Apache License 2.0 5 votes vote down vote up
@Override
public void dispose() {
  super.dispose();
  
  IPreferenceStore store = editor.getCasDocumentProvider().getTypeSystemPreferenceStore(
          editor.getEditorInput()); // TODO: Use old input, which was used when the view was created!
  
  if (store != null && changeListener != null)        
    store.removePropertyChangeListener(changeListener);
  
  editor.removeAnnotationListener(editorListener);
}
 
Example 10
Source File: TLAReconcilingStrategy.java    From tlaplus with MIT License 4 votes vote down vote up
public void dispose() {
    final IPreferenceStore store = PreferenceStoreHelper.getInstancePreferenceStore();
    store.removePropertyChangeListener(this);
}