/** * Returns the projection annotation model. * * @return the projection annotation model */ public ProjectionAnnotationModel getProjectionAnnotationModel() { IAnnotationModel model= getVisualAnnotationModel(); if (model instanceof IAnnotationModelExtension) { IAnnotationModelExtension extension= (IAnnotationModelExtension) model; return (ProjectionAnnotationModel) extension.getAnnotationModel(ProjectionSupport.PROJECTION); } return null; }
/** * Returns the projection annotation model. * * @return the projection annotation model */ public ProjectionAnnotationModel getProjectionAnnotationModel() { IAnnotationModel model= getVisualAnnotationModel(); if (model instanceof IAnnotationModelExtension) { IAnnotationModelExtension extension= (IAnnotationModelExtension) model; return (ProjectionAnnotationModel) extension.getAnnotationModel(ProjectionSupport.PROJECTION); } return null; }
@Override public void setDocument(IDocument document, IAnnotationModel annotationModel, int modelRangeOffset, int modelRangeLength) { boolean wasProjectionEnabled= false; synchronized (fLock) { fPendingRequests.clear(); } if (fProjectionAnnotationModel != null) { wasProjectionEnabled= removeProjectionAnnotationModel(getVisualAnnotationModel()) != null; fProjectionAnnotationModel= null; } super.setDocument(document, annotationModel, modelRangeOffset, modelRangeLength); if (wasProjectionEnabled && document != null) enableProjection(); }
@Override public void setDocument(IDocument document, IAnnotationModel annotationModel, int modelRangeOffset, int modelRangeLength) { boolean wasProjectionEnabled= false; synchronized (fLock) { fPendingRequests.clear(); } if (fProjectionAnnotationModel != null) { wasProjectionEnabled= removeProjectionAnnotationModel(getVisualAnnotationModel()) != null; fProjectionAnnotationModel= null; } super.setDocument(document, annotationModel, modelRangeOffset, modelRangeLength); if (wasProjectionEnabled && document != null) enableProjection(); }
/** * Enables the projection mode. */ public final void enableProjection() { if (!isProjectionMode()) { addProjectionAnnotationModel(getVisualAnnotationModel()); fFindReplaceDocumentAdapter= null; fireProjectionEnabled(); } }
private void internalUpdateSummaries(IProgressMonitor monitor) { IAnnotationModel visualAnnotationModel= fProjectionViewer.getVisualAnnotationModel(); if (visualAnnotationModel == null) return; removeSummaries(monitor, visualAnnotationModel); if (isCanceled(monitor)) return; createSummaries(monitor, visualAnnotationModel); }
private void internalUpdateSummaries(IProgressMonitor monitor) { IAnnotationModel visualAnnotationModel= fProjectionViewer.getVisualAnnotationModel(); if (visualAnnotationModel == null) return; removeSummaries(monitor, visualAnnotationModel); if (isCanceled(monitor)) return; createSummaries(monitor, visualAnnotationModel); }
/** * Enables the projection mode. */ public final void enableProjection() { if (!isProjectionMode()) { addProjectionAnnotationModel(getVisualAnnotationModel()); fFindReplaceDocumentAdapter= null; fireProjectionEnabled(); } }
/** * Disables the projection mode. */ public final void disableProjection() { if (isProjectionMode()) { removeProjectionAnnotationModel(getVisualAnnotationModel()); fProjectionAnnotationModel.removeAllAnnotations(); fFindReplaceDocumentAdapter= null; fireProjectionDisabled(); } }
/** * Disables the projection mode. */ public final void disableProjection() { if (isProjectionMode()) { removeProjectionAnnotationModel(getVisualAnnotationModel()); fProjectionAnnotationModel.removeAllAnnotations(); fFindReplaceDocumentAdapter= null; fireProjectionDisabled(); } }
/** * Enables projection mode. If not yet done, installs the projection ruler * column in the viewer's vertical ruler and installs a painter that * indicate the locations of collapsed regions. * */ protected void doEnableProjection() { if (fPainter == null) { fPainter= new ProjectionAnnotationsPainter(fViewer, fAnnotationAccess); fPainter.addDrawingStrategy(PROJECTION, getDrawingStrategy()); fPainter.addAnnotationType(ProjectionAnnotation.TYPE, PROJECTION); fPainter.setAnnotationTypeColor(ProjectionAnnotation.TYPE, fSharedTextColors.getColor(getColor())); fViewer.addPainter(fPainter); } if (fColumn == null) { fColumn= new ProjectionRulerColumn(9, fAnnotationAccess); fColumn.addAnnotationType(ProjectionAnnotation.TYPE); fColumn.setHover(createProjectionAnnotationHover()); fViewer.addVerticalRulerColumn(fColumn); } fColumn.setModel(fViewer.getVisualAnnotationModel()); }
/** * Enables projection mode. If not yet done, installs the projection ruler * column in the viewer's vertical ruler and installs a painter that * indicate the locations of collapsed regions. * */ protected void doEnableProjection() { if (fPainter == null) { fPainter= new ProjectionAnnotationsPainter(fViewer, fAnnotationAccess); fPainter.addDrawingStrategy(PROJECTION, getDrawingStrategy()); fPainter.addAnnotationType(ProjectionAnnotation.TYPE, PROJECTION); fPainter.setAnnotationTypeColor(ProjectionAnnotation.TYPE, fSharedTextColors.getColor(getColor())); fViewer.addPainter(fPainter); } if (fColumn == null) { fColumn= new ProjectionRulerColumn(9, fAnnotationAccess); fColumn.addAnnotationType(ProjectionAnnotation.TYPE); fColumn.setHover(createProjectionAnnotationHover()); fViewer.addVerticalRulerColumn(fColumn); } fColumn.setModel(fViewer.getVisualAnnotationModel()); }