Examples of MatchingCharacterPainter


Examples of org.eclipse.jface.text.source.MatchingCharacterPainter

    //    }, SWT.CTRL);

    ITextViewerExtension2 extension = (ITextViewerExtension2) getSourceViewer();
    _pairMatcher = new HTMLCharacterPairMatcher();
    _pairMatcher.setEnable(getPreferenceStore().getBoolean(HTMLPlugin.PREF_PAIR_CHAR));
    MatchingCharacterPainter painter = new MatchingCharacterPainter(getSourceViewer(), _pairMatcher);
    painter.setColor(Display.getDefault().getSystemColor(SWT.COLOR_GRAY));
    extension.addPainter(painter);

    getSourceViewer().getTextWidget().getParent().setBackground(parent.getBackground());

    update();
View Full Code Here

Examples of org.eclipse.jface.text.source.MatchingCharacterPainter

    widget.addVerifyListener(new SoftTabVerifyListener());

    ITextViewerExtension2 extension = (ITextViewerExtension2) getSourceViewer();
    pairMatcher = new CSSCharacterPairMatcher();
    pairMatcher.setEnable(getPreferenceStore().getBoolean(HTMLPlugin.PREF_PAIR_CHAR));
    MatchingCharacterPainter painter = new MatchingCharacterPainter(getSourceViewer(), pairMatcher);
    painter.setColor(Display.getDefault().getSystemColor(SWT.COLOR_GRAY));
    extension.addPainter(painter);
  }
View Full Code Here

Examples of org.eclipse.jface.text.source.MatchingCharacterPainter

   * Enables showing of matching characters.
   */
  private void showMatchingCharacters() {
    if (fMatchingCharacterPainter == null) {
      if (fSourceViewer instanceof ITextViewerExtension2) {
        fMatchingCharacterPainter= new MatchingCharacterPainter(fSourceViewer, fCharacterPairMatcher);
        fMatchingCharacterPainter.setColor(getColor(fMatchingCharacterPainterColorKey));
        fMatchingCharacterPainter.setHighlightCharacterAtCaretLocation(isCharacterAtCaretLocationShown());
        fMatchingCharacterPainter.setHighlightEnclosingPeerCharacters(areEnclosingPeerCharactersShown());
        ITextViewerExtension2 extension= (ITextViewerExtension2) fSourceViewer;
        extension.addPainter(fMatchingCharacterPainter);
View Full Code Here

Examples of org.eclipse.jface.text.source.MatchingCharacterPainter

            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 ) ) );

            paintManager = new PaintManager( sourceViewer );
            paintManager.addPainter( ap );
            paintManager.addPainter( mcp );
        }
View Full Code Here

Examples of org.eclipse.jface.text.source.MatchingCharacterPainter

            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 ) ) );

            this.paintManager = new PaintManager( this.sourceViewer );
            this.paintManager.addPainter( ap );
            this.paintManager.addPainter( mcp );
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.