Examples of addPainter()


Examples of org.eclipse.jface.text.ITextViewerExtension2.addPainter()

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

  @Override
  public void dispose() {
    pairMatcher.dispose();
View Full Code Here

Examples of org.eclipse.jface.text.ITextViewerExtension2.addPainter()

        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.ITextViewerExtension2.addPainter()

    if (fCursorLinePainter == null) {
      if (fSourceViewer instanceof ITextViewerExtension2) {
        fCursorLinePainter= new CursorLinePainter(fSourceViewer);
        fCursorLinePainter.setHighlightColor(getColor(fCursorLinePainterColorKey));
        ITextViewerExtension2 extension= (ITextViewerExtension2) fSourceViewer;
        extension.addPainter(fCursorLinePainter);
      }
    }
  }

  /**
 
View Full Code Here

Examples of org.eclipse.jface.text.ITextViewerExtension2.addPainter()

        fMarginPainter= new MarginPainter(fSourceViewer);
        fMarginPainter.setMarginRulerColor(getColor(fMarginPainterColorKey));
        if (fPreferenceStore != null)
          fMarginPainter.setMarginRulerColumn(fPreferenceStore.getInt(fMarginPainterColumnKey));
        ITextViewerExtension2 extension= (ITextViewerExtension2) fSourceViewer;
        extension.addPainter(fMarginPainter);

        fFontPropertyChangeListener= new FontPropertyChangeListener();
        JFaceResources.getFontRegistry().addListener(fFontPropertyChangeListener);
      }
    }
View Full Code Here

Examples of org.eclipse.jface.text.ITextViewerExtension2.addPainter()

      if (fAnnotationPainter == null) {
        fAnnotationPainter= createAnnotationPainter();
        if (fSourceViewer instanceof ITextViewerExtension4)
          ((ITextViewerExtension4)fSourceViewer).addTextPresentationListener(fAnnotationPainter);
        ITextViewerExtension2 extension= (ITextViewerExtension2) fSourceViewer;
        extension.addPainter(fAnnotationPainter);
      }
      fAnnotationPainter.setAnnotationTypeColor(annotationType, getAnnotationTypeColor(annotationType));
      Object decorationType= getAnnotationDecorationType(annotationType);
      if (decorationType != null)
        fAnnotationPainter.addAnnotationType(annotationType, decorationType);
View Full Code Here

Examples of org.eclipse.jface.text.ITextViewerExtension2.addPainter()

    if (fMatchingCharacterPainter == null) {
      if (fSourceViewer instanceof ITextViewerExtension2) {
        fMatchingCharacterPainter= new MatchingCharacterPainter(fSourceViewer, fCharacterPairMatcher);
        fMatchingCharacterPainter.setColor(getColor(fMatchingCharacterPainterColorKey));
        ITextViewerExtension2 extension= (ITextViewerExtension2) fSourceViewer;
        extension.addPainter(fMatchingCharacterPainter);
      }
    }
  }

  /**
 
View Full Code Here

Examples of org.eclipse.jface.text.ITextViewerExtension2.addPainter()

    if (fCursorLinePainter == null || fSourceViewer != null) {
      if (fSourceViewer instanceof ITextViewerExtension2) {
        fCursorLinePainter= new CursorLinePainter(fSourceViewer);
        fCursorLinePainter.setHighlightColor(getColor(fCursorLinePainterColorKey));
        ITextViewerExtension2 extension= (ITextViewerExtension2) fSourceViewer;
        extension.addPainter(fCursorLinePainter);
      }
    }
    }
    catch (NullPointerException npe) {
      npe.printStackTrace();
View Full Code Here

Examples of org.eclipse.jface.text.ITextViewerExtension2.addPainter()

        if (fPreferenceStore != null) {         
          fMarginPainter.setMarginRulerColumn(fPreferenceStore.getInt(fMarginPainterColumnKey));
          fMarginPainter.setMarginRulerColor(getColor(fMarginPainterColorKey));     
        }
        ITextViewerExtension2 extension= (ITextViewerExtension2) fSourceViewer;
        extension.addPainter(fMarginPainter);
       
        fFontPropertyChangeListener= new FontPropertyChangeListener();
        JFaceResources.getFontRegistry().addListener(fFontPropertyChangeListener);
      }
    }
View Full Code Here

Examples of org.eclipse.jface.text.ITextViewerExtension2.addPainter()

      if (fAnnotationPainter == null) {
        fAnnotationPainter= createAnnotationPainter();
        if (fSourceViewer instanceof ITextViewerExtension4)
          ((ITextViewerExtension4)fSourceViewer).addTextPresentationListener(fAnnotationPainter);
        ITextViewerExtension2 extension= (ITextViewerExtension2) fSourceViewer;
        extension.addPainter(fAnnotationPainter);
      }
      fAnnotationPainter.setAnnotationTypeColor(annotationType, getAnnotationTypeColor(annotationType));
      if (highlighting)
        fAnnotationPainter.addHighlightAnnotationType(annotationType);
      else {
View Full Code Here

Examples of org.eclipse.jface.text.source.SourceViewer.addPainter()

    sourceViewer.setEditable(false);

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

    sourceViewer.addPainter(mPainter);

    return sourceViewer;
  }

  /**
 
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.