public void uninstall() { ISourceViewer sourceViewer = editor.getISourceViewer(); if (sourceViewer != null) sourceViewer.removeTextInputListener(this); IDocumentProvider documentProvider = editor.getDocumentProvider(); if (documentProvider != null) { IDocument document = documentProvider.getDocument(editor.getEditorInput()); if (document != null) document.removeDocumentListener(this); } }
public void uninstall() { final ISourceViewer sourceViewer = erlangEditor.getViewer(); if (sourceViewer != null) { sourceViewer.removeTextInputListener(this); } final IDocumentProvider documentProvider = erlangEditor.getDocumentProvider(); if (documentProvider != null) { final IDocument document = documentProvider.getDocument(erlangEditor.getEditorInput()); if (document != null) { document.removeDocumentListener(this); } } }
/** Uninstall this reconciler from the editor */ public void uninstall() { if (fPresenter != null) fPresenter.setCanceled(true); if (fEditor != null) { if (fEditor instanceof CompilationUnitEditor) ((CompilationUnitEditor) fEditor).removeReconcileListener(this); else fSourceViewer.removeTextInputListener(this); fEditor = null; } fSourceViewer = null; fSemanticHighlightings = null; fHighlightings = null; fPresenter = null; }