public void disconnect(IDocument document) { if(delegate != null) { delegate.disconnect(document); } }
protected void dispose() { if (fAnnotationModel != null) fAnnotationModel.disconnect(fDocument); fDocument= null; super.dispose(); }
@Override public IAnnotationModel removeAnnotationModel(Object key) { IAnnotationModel ret= fAttachments.remove(key); if (ret != null) { for (int i= 0; i < fOpenConnections; i++) ret.disconnect(fDocument); ret.removeAnnotationModelListener(fModelListener); } return ret; }
@Override protected void disconnected() { if (fAnnotationModel != null) fAnnotationModel.disconnect(fDocument); super.disconnected(); }
@Override public IAnnotationModel removeAnnotationModel(Object key) { IAnnotationModel ret= fAttachments.remove(key); if (ret != null) { for (int i= 0; i < fOpenConnections; i++) ret.disconnect(fDocument); ret.removeAnnotationModelListener(fModelListener); } return ret; }
protected void disconnected() { if (fAnnotationModel != null) fAnnotationModel.disconnect(fDocument); super.disconnected(); }
@Override protected void dispose() { try { fDocument.removePositionCategory(IDocument.DEFAULT_CATEGORY); } catch (BadPositionCategoryException ex) { // Category is already gone - no problem. } if (fAnnotationModel != null) fAnnotationModel.disconnect(fDocument); fDocument= null; super.dispose(); }
@Override public void disconnect(IDocument document) { Assert.isTrue(fDocument == document); for (Iterator<Object> it= fAttachments.keySet().iterator(); it.hasNext();) { IAnnotationModel model= fAttachments.get(it.next()); model.disconnect(document); } -- fOpenConnections; if (fOpenConnections == 0) { disconnected(); document.removeDocumentListener(fDocumentListener); Iterator<Position> e= getAnnotationMap().valuesIterator(); while (e.hasNext()) { Position p= e.next(); removePosition(document, p); } fDocument= null; } }
/** * Disonnect the CompilationUnitDocumentProvider from the * * @input and disconnect the annotation model from the provider from the IDocument of the * @input. */ protected void disconnect(IEditorInput input) { IDocument doc = cuDocumentProvider.getDocument(input); cuDocumentProvider.getAnnotationModel(input).disconnect(doc); javaWorkingCopyManager.disconnect(input); }
/** * Disposes the visual annotation model. * * @since 3.1 */ protected void disposeVisualAnnotationModel() { if (this.fVisualAnnotationModel != null) { if (getDocument() != null) this.fVisualAnnotationModel.disconnect(getDocument()); if ( this.fVisualAnnotationModel instanceof IAnnotationModelExtension) ((IAnnotationModelExtension)this.fVisualAnnotationModel).removeAnnotationModel(MODEL_ANNOTATION_MODEL); this.fVisualAnnotationModel= null; } }
/** * Disposes the visual annotation model. * * @since 3.1 */ protected void disposeVisualAnnotationModel() { if (fVisualAnnotationModel != null) { if (getDocument() != null) fVisualAnnotationModel.disconnect(getDocument()); if ( fVisualAnnotationModel instanceof IAnnotationModelExtension) ((IAnnotationModelExtension)fVisualAnnotationModel).removeAnnotationModel(MODEL_ANNOTATION_MODEL); fVisualAnnotationModel= null; } }
/** * Disposes the visual annotation model. * * @since 3.1 */ protected void disposeVisualAnnotationModel() { if (fVisualAnnotationModel != null) { if (getDocument() != null) fVisualAnnotationModel.disconnect(getDocument()); if ( fVisualAnnotationModel instanceof IAnnotationModelExtension) ((IAnnotationModelExtension)fVisualAnnotationModel).removeAnnotationModel(MODEL_ANNOTATION_MODEL); fVisualAnnotationModel= null; } }
@Override public void disconnect(IDocument document) { Assert.isTrue(fDocument == document); for (IAnnotationModel model : fAttachments.values()) { model.disconnect(document); } -- fOpenConnections; if (fOpenConnections == 0) { disconnected(); document.removeDocumentListener(fDocumentListener); Iterator<Position> e= getAnnotationMap().valuesIterator(); while (e.hasNext()) { Position p= e.next(); removePosition(document, p); } fDocument= null; } }
private void deinitializeDocumentProvider() { IAnnotationModel amodel = fDocumentProvider.getAnnotationModel(fEditorInput); if (amodel != null) { amodel.disconnect(fDocumentProvider.getDocument(fEditorInput)); } fDocumentProvider.removeElementStateListener(fElementListener); fDocumentProvider.disconnect(fEditorInput); }
public void dispose() { IAnnotationModel amodel = fDocumentProvider.getAnnotationModel(fEditorInput); if (amodel != null) amodel.disconnect(fDocumentProvider.getDocument(fEditorInput)); fDocumentProvider.removeElementStateListener(fElementListener); fDocumentProvider.disconnect(fEditorInput); if (fModelListener != null && fModel instanceof IModelChangeProvider) { ((IModelChangeProvider) fModel).removeModelChangedListener(fModelListener); //if (undoManager != null) //undoManager.disconnect((IModelChangeProvider) model); } if (fModel != null) fModel.dispose(); }
protected void revert(IEditorInput input) { try { cuDocumentProvider.resetDocument(input); } catch (CoreException e) { Logger.getLogger().logError(e); } IDocument doc = cuDocumentProvider.getDocument(input); IAnnotationModel model = cuDocumentProvider.getAnnotationModel(input); if (model instanceof AbstractMarkerAnnotationModel) { AbstractMarkerAnnotationModel markerModel = (AbstractMarkerAnnotationModel) model; markerModel.resetMarkers(); } model.disconnect(doc); javaWorkingCopyManager.disconnect(input); }