@Override public void unselected(ITextViewer viewer) { if (fTextPresentationListener != null) { ((ITextViewerExtension4)viewer).removeTextPresentationListener(fTextPresentationListener); fTextPresentationListener= null; } repairPresentation(viewer); fRememberedStyleRange= null; }
@Override public void unselected(ITextViewer viewer) { if (fTextPresentationListener != null) { ((ITextViewerExtension4)viewer).removeTextPresentationListener(fTextPresentationListener); fTextPresentationListener= null; } repairPresentation(viewer); fRememberedStyleRange= null; }
void uninstall() { StyledText editorTextWidget = fEditorViewer.getTextWidget(); // untrack changed content of styled text of the editor if (editorTextWidget.getContent() != null) { editorTextWidget.getContent().removeTextChangeListener(this); } // untrack changed styles of styled text of the editor if (fEditorViewer instanceof ITextViewerExtension4) { ((ITextViewerExtension4) fEditorViewer).removeTextPresentationListener(this); } fEditorViewer.removeTextInputListener(this); // track changed of vertical bar scroll to update highlight // Viewport. fEditorViewer.removeViewportListener(this); editorTextWidget.removeControlListener(this); fScaledFonts.values().forEach(Font::dispose); } }
/** * Updates the annotation painter. * @since 3.0 */ private void updateAnnotationPainter() { if (fAnnotationPainter == null) return; fAnnotationPainter.paint(IPainter.CONFIGURATION); if (!fAnnotationPainter.isPaintingAnnotations()) { if (fSourceViewer instanceof ITextViewerExtension2) { ITextViewerExtension2 extension= (ITextViewerExtension2) fSourceViewer; extension.removePainter(fAnnotationPainter); } if (fSourceViewer instanceof ITextViewerExtension4) ((ITextViewerExtension4)fSourceViewer).removeTextPresentationListener(fAnnotationPainter); fAnnotationPainter.deactivate(true); fAnnotationPainter.dispose(); fAnnotationPainter= null; } }
/** * Updates the annotation painter. * @since 3.0 */ private void updateAnnotationPainter() { if (fAnnotationPainter == null) return; fAnnotationPainter.paint(IPainter.CONFIGURATION); if (!fAnnotationPainter.isPaintingAnnotations()) { if (fSourceViewer instanceof ITextViewerExtension2) { ITextViewerExtension2 extension= (ITextViewerExtension2) fSourceViewer; extension.removePainter(fAnnotationPainter); } if (fSourceViewer instanceof ITextViewerExtension4) ((ITextViewerExtension4)fSourceViewer).removeTextPresentationListener(fAnnotationPainter); fAnnotationPainter.deactivate(true); fAnnotationPainter.dispose(); fAnnotationPainter= null; } }
/** * Updates the annotation painter. * @since 3.0 */ private void updateAnnotationPainter() { if (fAnnotationPainter == null) return; fAnnotationPainter.paint(IPainter.CONFIGURATION); if (!fAnnotationPainter.isPaintingAnnotations()) { if (fSourceViewer instanceof ITextViewerExtension2) { ITextViewerExtension2 extension= (ITextViewerExtension2) fSourceViewer; extension.removePainter(fAnnotationPainter); } if (fSourceViewer instanceof ITextViewerExtension4) ((ITextViewerExtension4)fSourceViewer).removeTextPresentationListener(fAnnotationPainter); fAnnotationPainter.deactivate(true); fAnnotationPainter.dispose(); fAnnotationPainter= null; } }
@Override public void uninstall() { fTextViewer.removeTextInputListener(this); IDocument document= fTextViewer.getDocument(); if (document != null) document.removeDocumentListener(this); if (fColor != null) { if (fDisposeColor) fColor.dispose(); fColor= null; } if (fTextViewer instanceof ITextViewerExtension4) ((ITextViewerExtension4)fTextViewer).removeTextPresentationListener(this); fTextViewer= null; if (fPreferenceStore != null) { fPreferenceStore.removePropertyChangeListener(this); fPreferenceStore= null; } }
@Override public void uninstall() { fTextViewer.removeTextInputListener(this); IDocument document= fTextViewer.getDocument(); if (document != null) document.removeDocumentListener(this); if (fColor != null) { if (fDisposeColor) fColor.dispose(); fColor= null; } if (fTextViewer instanceof ITextViewerExtension4) ((ITextViewerExtension4)fTextViewer).removeTextPresentationListener(this); fTextViewer= null; if (fPreferenceStore != null) { fPreferenceStore.removePropertyChangeListener(this); fPreferenceStore= null; } }
/** * Unisntall the inlined annotation support */ public void uninstall() { StyledText text= this.fViewer.getTextWidget(); if (text != null && !text.isDisposed()) { text.removeMouseListener(this.fMouseTracker); text.removeMouseMoveListener(this.fMouseTracker); } if (fViewer != null) { if (fViewer instanceof ITextViewerExtension4) { ((ITextViewerExtension4) fViewer).removeTextPresentationListener(updateStylesWidth); } } if (visibleLines != null) { visibleLines.uninstall(); visibleLines= null; } removeInlinedAnnotations(); disposeFont(); fViewer= null; fPainter= null; }