/** * Clears the list of annotation types whose annotations are * painted by this painter. */ public void removeAllAnnotationTypes() { fCachedAnnotationType2PaintingStrategy.clear(); fAnnotationType2PaintingStrategyId.clear(); if (fTextInputListener != null) { fSourceViewer.removeTextInputListener(fTextInputListener); fTextInputListener= null; } }
/** * Clears the list of annotation types whose annotations are * painted by this painter. */ public void removeAllAnnotationTypes() { fCachedAnnotationType2PaintingStrategy.clear(); fAnnotationType2PaintingStrategyId.clear(); if (fTextInputListener != null) { fSourceViewer.removeTextInputListener(fTextInputListener); fTextInputListener= null; } }
/** * Removes the given annotation type from the list of annotation types whose * annotations are painted by this painter. If the annotation type is not * in this list, this method is without effect. * * @param annotationType the annotation type */ public void removeAnnotationType(Object annotationType) { fCachedAnnotationType2PaintingStrategy.clear(); fAnnotationType2PaintingStrategyId.remove(annotationType); if (fAnnotationType2PaintingStrategyId.isEmpty() && fTextInputListener != null) { fSourceViewer.removeTextInputListener(fTextInputListener); fTextInputListener= null; fInputDocumentAboutToBeChanged= false; } }
/** * Removes the given annotation type from the list of annotation types whose * annotations are painted by this painter. If the annotation type is not * in this list, this method is without effect. * * @param annotationType the annotation type */ public void removeAnnotationType(Object annotationType) { fCachedAnnotationType2PaintingStrategy.clear(); fAnnotationType2PaintingStrategyId.remove(annotationType); if (fAnnotationType2PaintingStrategyId.isEmpty() && fTextInputListener != null) { fSourceViewer.removeTextInputListener(fTextInputListener); fTextInputListener= null; fInputDocumentAboutToBeChanged= false; } }
/** * 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; }
/** * 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; }
/** * 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; }
public void uninstall() { ISourceViewer sourceViewer= getSourceViewer(); if (sourceViewer != null) sourceViewer.removeTextInputListener(this); IDocumentProvider documentProvider= getDocumentProvider(); if (documentProvider != null) { IDocument document= documentProvider.getDocument(getEditorInput()); if (document != null) document.removeDocumentListener(this); } }
@Override public void dispose() { contribution.deregister(this); sourceViewer.removeTextInputListener(textInputListener); if (modelListener != null) { xtextDocument.removeModelListener(modelListener); modelListener = null; } contentProvider.dispose(); super.dispose(); }
public void uninstall() { ISourceViewer sourceViewer= getSourceViewer(); if (sourceViewer != null) sourceViewer.removeTextInputListener(this); IDocumentProvider documentProvider= getDocumentProvider(); if (documentProvider != null) { IDocument document= documentProvider.getDocument(getEditorInput()); if (document != null) document.removeDocumentListener(this); } }
public void uninstall() { ISourceViewer sourceViewer= getSourceViewer(); if (sourceViewer != null) sourceViewer.removeTextInputListener(this); IDocumentProvider documentProvider= getDocumentProvider(); if (documentProvider != null) { IDocument document= documentProvider.getDocument(getEditorInput()); if (document != null) document.removeDocumentListener(this); } }
public void uninstall() { ISourceViewer sourceViewer = getSourceViewer(); if (sourceViewer != null) sourceViewer.removeTextInputListener(this); IDocumentProvider documentProvider = getDocumentProvider(); if (documentProvider != null) { IDocument document = documentProvider.getDocument(getEditorInput()); if (document != null) document.removeDocumentListener(this); } }
@Override public boolean validateEditorInputState() { boolean enabled= false; synchronized (this) { enabled= fIsStateValidationEnabled; } if (enabled) { ISourceViewer viewer= fSourceViewer; if (viewer == null) return false; fTextInputListener.inputChanged= false; viewer.addTextInputListener(fTextInputListener); try { final IEditorInput input= getEditorInput(); BusyIndicator.showWhile(getSite().getShell().getDisplay(), new Runnable() { @Override public void run() { validateState(input); } }); sanityCheckState(input); return !isEditorInputReadOnly() && !fTextInputListener.inputChanged; } finally { viewer.removeTextInputListener(fTextInputListener); } } return !isEditorInputReadOnly(); }
public boolean validateEditorInputState() { boolean enabled= false; synchronized (this) { enabled= fIsStateValidationEnabled; } if (enabled) { ISourceViewer viewer= fSourceViewer; if (viewer == null) return false; fTextInputListener.inputChanged= false; viewer.addTextInputListener(fTextInputListener); try { final IEditorInput input= getEditorInput(); BusyIndicator.showWhile(getSite().getShell().getDisplay(), new Runnable() { /* * @see java.lang.Runnable#run() */ public void run() { validateState(input); } }); sanityCheckState(input); return !isEditorInputReadOnly() && !fTextInputListener.inputChanged; } finally { viewer.removeTextInputListener(fTextInputListener); } } return !isEditorInputReadOnly(); }
@Override public boolean validateEditorInputState() { boolean enabled= false; synchronized (this) { enabled= fIsStateValidationEnabled; } if (enabled) { ISourceViewer viewer= fSourceViewer; if (viewer == null) return false; fTextInputListener.inputChanged= false; viewer.addTextInputListener(fTextInputListener); try { final IEditorInput input= getEditorInput(); BusyIndicator.showWhile(getSite().getShell().getDisplay(), () -> validateState(input)); sanityCheckState(input); return !isEditorInputReadOnly() && !fTextInputListener.inputChanged; } finally { viewer.removeTextInputListener(fTextInputListener); } } return !isEditorInputReadOnly(); }
fSourceViewer.removeTextInputListener(fTextListener); fTextListener= null;
fSourceViewer.removeTextInputListener(fTextListener); fTextListener= null;
fSourceViewer.removeTextInputListener(fTextListener); fTextListener= null;