/** * 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()); }