org.eclipse.jface.text.source.AnnotationPainter Java Examples

The following examples show how to use org.eclipse.jface.text.source.AnnotationPainter. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CustomAnnotationManager.java    From saros with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Uninstalls the custom {@link AnnotationPainter annotation painter} from the given source
 * viewer. If there is no custom annotation painter installed this method just returns.
 *
 * @param sourceViewer
 * @param redraw
 */
public void uninstallPainter(ISourceViewer sourceViewer, boolean redraw) {

  AnnotationPainter painter = installedPainters.remove(sourceViewer);

  if (painter == null) return;

  painter.deactivate(redraw);
  painter.dispose();
}
 
Example #2
Source File: AnnotationEditor.java    From uima-uimaj with Apache License 2.0 3 votes vote down vote up
@Override
protected ISourceViewer createSourceViewer(Composite parent,
        org.eclipse.jface.text.source.IVerticalRuler ruler, int styles) {
  SourceViewer sourceViewer = new SourceViewer(parent, ruler, styles);

  sourceViewer.setEditable(false);

  mPainter = new AnnotationPainter(sourceViewer, new AnnotationAccess());

  sourceViewer.addPainter(mPainter);
  
  return sourceViewer;
}