Package org.eclipse.jface.text.source

Examples of org.eclipse.jface.text.source.AnnotationPainter$UnderlineStrategy


    super(sourceViewer, overviewRuler, annotationAccess, sharedTextColors);
  }

  @Override
  protected AnnotationPainter createAnnotationPainter() {
    AnnotationPainter annotationPainter = super.createAnnotationPainter();
    //annotationPainter.addDrawingStrategy(AnnotationPreference.STYLE_BOX, _roundBoxStrategy);
    return annotationPainter;
  }
View Full Code Here


   * Creates and configures the annotation painter and configures.
   * @return an annotation painter
   * @since 3.0
   */
  protected AnnotationPainter createAnnotationPainter() {
    AnnotationPainter painter= new AnnotationPainter(fSourceViewer, fAnnotationAccess);

    /*
     * XXX:
     * Could provide an extension point for drawing strategies,
     * see https://bugs.eclipse.org/bugs/show_bug.cgi?id=51498
     */
    painter.addDrawingStrategy(AnnotationPreference.STYLE_NONE, fgNullStrategy);
    painter.addDrawingStrategy(AnnotationPreference.STYLE_IBEAM, fgIBeamStrategy);

    painter.addTextStyleStrategy(AnnotationPreference.STYLE_SQUIGGLES, fgSquigglesStrategy);
    painter.addTextStyleStrategy(AnnotationPreference.STYLE_PROBLEM_UNDERLINE, fgProblemUnderlineStrategy);
    painter.addTextStyleStrategy(AnnotationPreference.STYLE_BOX, fgBoxStrategy);
    painter.addTextStyleStrategy(AnnotationPreference.STYLE_DASHED_BOX, fgDashedBoxStrategy);
    painter.addTextStyleStrategy(AnnotationPreference.STYLE_UNDERLINE, fgUnderlineStrategy);

    return painter;
  }
View Full Code Here

    viewer.addTextInputListener(this);
    attachHighlightPainter(viewer, highlightColor, annotationType);
  }
 
  private void attachHighlightPainter(SourceViewer viewer, Color highlightColor, String annotationType) {
    final AnnotationPainter painter = new AnnotationPainter(viewer, createAnnotationAccess());
    painter.addHighlightAnnotationType(annotationType);
    painter.setAnnotationTypeColor(annotationType, highlightColor);
    viewer.addPainter(painter);
    viewer.addTextPresentationListener(painter);
  }
View Full Code Here

        }

        // add annotation painter
        if ( paintManager == null && sourceViewer.getAnnotationModel() instanceof IAnnotationModelExtension )
        {
            AnnotationPainter ap = new AnnotationPainter( sourceViewer, null );
            ap.addAnnotationType( "DEFAULT" );
            ap.setAnnotationTypeColor( "DEFAULT", BrowserCommonActivator.getDefault().getColor( new RGB( 255, 0, 0 ) ) );
            sourceViewer.getAnnotationModel().addAnnotationModelListener( ap );

            FilterCharacterPairMatcher cpm = new FilterCharacterPairMatcher( sourceViewer, parser );
            MatchingCharacterPainter mcp = new MatchingCharacterPainter( sourceViewer, cpm );
            mcp.setColor( BrowserCommonActivator.getDefault().getColor( new RGB( 159, 159, 159 ) ) );
View Full Code Here

          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;
  }
View Full Code Here

   * Creates and configures the annotation painter and configures.
   * @return an annotation painter
   * @since 3.0
   */
  protected AnnotationPainter createAnnotationPainter() {
    AnnotationPainter painter= new AnnotationPainter(fSourceViewer, fAnnotationAccess);
   
    // TODO add extension point for drawing strategies?
    painter.addDrawingStrategy(AnnotationPreference.STYLE_BOX, fgBoxStrategy);
    painter.addDrawingStrategy(AnnotationPreference.STYLE_DASHED_BOX, fgBoxStrategy);
    painter.addDrawingStrategy(AnnotationPreference.STYLE_NONE, fgNullStrategy);
    painter.addDrawingStrategy(AnnotationPreference.STYLE_SQUIGGLES, fgSquigglesStrategy);
    painter.addDrawingStrategy(AnnotationPreference.STYLE_UNDERLINE, fgUnderlineStrategy);
    painter.addDrawingStrategy(AnnotationPreference.STYLE_IBEAM, fgIBeamStrategy);
   
    return painter;
  }
View Full Code Here

        }

        // add annotation painter
        if ( this.paintManager == null && this.sourceViewer.getAnnotationModel() instanceof IAnnotationModelExtension )
        {
            AnnotationPainter ap = new AnnotationPainter( this.sourceViewer, null );
            ap.addAnnotationType( "DEFAULT" );
            ap.setAnnotationTypeColor( "DEFAULT", BrowserUIPlugin.getDefault().getColor( new RGB( 255, 0, 0 ) ) );
            this.sourceViewer.getAnnotationModel().addAnnotationModelListener( ap );

            FilterCharacterPairMatcher cpm = new FilterCharacterPairMatcher( this.sourceViewer, this.parser );
            MatchingCharacterPainter mcp = new MatchingCharacterPainter( this.sourceViewer, cpm );
            mcp.setColor( BrowserUIPlugin.getDefault().getColor( new RGB( 159, 159, 159 ) ) );
View Full Code Here

TOP

Related Classes of org.eclipse.jface.text.source.AnnotationPainter$UnderlineStrategy

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.