/** * Disconnects any registered listeners. */ private void disconnect() { fViewer.removeTextListener(fTextListener); ensureSelectionListenerRemoved(); }
/** * Disconnects any registered listeners. */ private void disconnect() { fViewer.removeTextListener(fTextListener); ensureSelectionListenerRemoved(); }
/** * Disconnects any registered listeners. */ private void disconnect() { fViewer.removeTextListener(fTextListener); ensureSelectionListenerRemoved(); }
/** * Disposes the ruler's resources. */ private void handleDispose() { if (fTextViewer != null) { fTextViewer.removeTextListener(fInternalListener); fTextViewer= null; } if (fModel != null) fModel.removeAnnotationModelListener(fInternalListener); if (fBuffer != null) { fBuffer.dispose(); fBuffer= null; } synchronized (fRunnableLock){ fConfiguredAnnotationTypes.clear(); fAllowedAnnotationTypes.clear(); fConfiguredHeaderAnnotationTypes.clear(); fAllowedHeaderAnnotationTypes.clear(); } fAnnotationTypes2Colors.clear(); fAnnotationsSortedByLayer.clear(); fLayersSortedByLayer.clear(); }
/** * Disposes the column's resources. */ protected void handleDispose() { if (fCachedTextViewer != null) { fCachedTextViewer.removeViewportListener(fInternalListener); fCachedTextViewer.removeTextListener(fInternalListener); } if (fBuffer != null) { fBuffer.dispose(); fBuffer= null; } }
/** * Disposes the column's resources. */ protected void handleDispose() { if (fCachedTextViewer != null) { fCachedTextViewer.removeViewportListener(fInternalListener); fCachedTextViewer.removeTextListener(fInternalListener); } if (fBuffer != null) { fBuffer.dispose(); fBuffer= null; } }
/** * Disposes the column's resources. */ protected void handleDispose() { if (fCachedTextViewer != null) { fCachedTextViewer.removeViewportListener(fInternalListener); fCachedTextViewer.removeTextListener(fInternalListener); } if (fBuffer != null) { fBuffer.dispose(); fBuffer= null; } }
/** * Disposes the ruler's resources. */ private void handleDispose() { if (fCachedTextViewer != null) { VisibleLinesTracker.untrack(fCachedTextViewer, lineHeightChangeHandler); fCachedTextViewer.removeTextListener(fLineListener); } if (fModel != null) fModel.removeAnnotationModelListener(fAnnotationListener); if (fBuffer != null) { fBuffer.dispose(); fBuffer= null; } fConfiguredAnnotationTypes.clear(); fAllowedAnnotationTypes.clear(); fAnnotationAccessExtension= null; }
/** * Disposes the ruler's resources. */ private void handleDispose() { if (fCachedTextViewer != null) { fCachedTextViewer.removeViewportListener(fInternalListener); fCachedTextViewer.removeTextListener(fInternalListener); } if (fModel != null) fModel.removeAnnotationModelListener(fInternalListener); if (fBuffer != null) { fBuffer.dispose(); fBuffer= null; } fConfiguredAnnotationTypes.clear(); fAllowedAnnotationTypes.clear(); fAnnotationAccessExtension= null; }
/** * Disposes this ruler column. * <p> * Subclasses may extend this method.</p> * <p> * Clients who created this column are responsible to call this method * once the column is no longer used.</p> */ public void dispose() { if (fTextViewer != null) { fTextViewer.removeViewportListener(fInternalListener); fTextViewer.removeTextListener(fInternalListener); fTextViewer= null; } if (fStyledText != null) fStyledText= null; if (fCanvas != null) { fCanvas.dispose(); fCanvas= null; } }
/** * Disposes this ruler column. * <p> * Subclasses may extend this method.</p> * <p> * Clients who created this column are responsible to call this method * once the column is no longer used.</p> */ public void dispose() { if (fTextViewer != null) { fTextViewer.removeViewportListener(fInternalListener); fTextViewer.removeTextListener(fInternalListener); fTextViewer= null; } if (fStyledText != null) fStyledText= null; if (fCanvas != null) { fCanvas.dispose(); fCanvas= null; } }
/** * Disposes the ruler's resources. */ private void handleDispose() { if (fTextViewer != null) { fTextViewer.removeViewportListener(fInternalListener); fTextViewer.removeTextListener(fInternalListener); fTextViewer= null; } if (fModel != null) fModel.removeAnnotationModelListener(fInternalListener); if (fBuffer != null) { fBuffer.dispose(); fBuffer= null; } }
/** * Disposes the ruler's resources. */ private void handleDispose() { if (fTextViewer != null) { fTextViewer.removeViewportListener(fInternalListener); fTextViewer.removeTextListener(fInternalListener); fTextViewer= null; } if (fModel != null) fModel.removeAnnotationModelListener(fInternalListener); if (fBuffer != null) { fBuffer.dispose(); fBuffer= null; } }
@Override public void inputDocumentAboutToBeChanged(IDocument oldDocument, IDocument newDocument) { if (oldDocument != null) { try { fViewer.removeTextListener(this); oldDocument.removeDocumentListener(this); oldDocument.removeDocumentPartitioningListener(this); oldDocument.removePositionUpdater(fPositionUpdater); oldDocument.removePositionCategory(fPositionCategory); } catch (BadPositionCategoryException x) { // should not happened for former input documents; } } }
@Override public void inputDocumentAboutToBeChanged(IDocument oldDocument, IDocument newDocument) { if (oldDocument != null) { try { fViewer.removeTextListener(this); oldDocument.removeDocumentListener(this); oldDocument.removeDocumentPartitioningListener(this); oldDocument.removePositionUpdater(fPositionUpdater); oldDocument.removePositionCategory(fPositionCategory); } catch (BadPositionCategoryException x) { // should not happened for former input documents; } } }
/** * Removes our set of listeners from the text viewer and widget, * respectively. */ private void removeListeners() { ISelectionProvider provider= fTextViewer.getSelectionProvider(); if (provider != null) provider.removeSelectionChangedListener(this); fTextViewer.removeTextListener(this); StyledText text= fTextViewer.getTextWidget(); if (text != null && !text.isDisposed()) { text.removeKeyListener(this); text.removeMouseListener(this); } }
/** * Removes our set of listeners from the text viewer and widget, * respectively. */ private void removeListeners() { ISelectionProvider provider= fTextViewer.getSelectionProvider(); if (provider != null) provider.removeSelectionChangedListener(this); fTextViewer.removeTextListener(this); StyledText text= fTextViewer.getTextWidget(); if (text != null && !text.isDisposed()) { text.removeKeyListener(this); text.removeMouseListener(this); } }
private void uninstall() { if (!installed) { return; } StyledText textWidget = textViewer.getTextWidget(); if (textWidget == null) { return; } textViewer.removeTextListener(this); textWidget.removeMouseListener(this); textWidget.removeFocusListener(this); ISelectionProvider selectionProvider = textViewer.getSelectionProvider(); if (selectionProvider != null) { selectionProvider.removeSelectionChangedListener(this); } if (textViewer instanceof ITextViewerExtension) { ((ITextViewerExtension) textViewer).removeVerifyKeyListener(this); } else { textWidget.removeVerifyKeyListener(this); } ICommandService commandService = (ICommandService) PlatformUI.getWorkbench().getAdapter(ICommandService.class); if (commandService != null) { commandService.removeExecutionListener(this); } installed = false; }
/** * Uninstalls this hyperlink manager. */ public void uninstall() { deactivate(); StyledText text= fTextViewer.getTextWidget(); if (text != null && !text.isDisposed()) { text.removeKeyListener(this); text.getDisplay().removeFilter(SWT.KeyUp, this); text.removeMouseListener(this); text.removeMouseMoveListener(this); text.removeFocusListener(this); text.removeMouseTrackListener(this); } fTextViewer.removeTextListener(this); fHyperlinkPresenter.uninstall(); fHyperlinkPresenter= null; fTextViewer= null; fHyperlinkDetectors= null; }
/** * Uninstalls this hyperlink manager. */ public void uninstall() { deactivate(); StyledText text= fTextViewer.getTextWidget(); if (text != null && !text.isDisposed()) { text.removeKeyListener(this); text.getDisplay().removeFilter(SWT.KeyUp, this); text.removeMouseListener(this); text.removeMouseMoveListener(this); text.removeFocusListener(this); text.removeMouseTrackListener(this); } fTextViewer.removeTextListener(this); fHyperlinkPresenter.uninstall(); fHyperlinkPresenter= null; fTextViewer= null; fHyperlinkDetectors= null; }