Package org.eclipse.jface.text

Examples of org.eclipse.jface.text.WhitespaceCharacterPainter


  private void installPainter() {
    Assert.isTrue(fWhitespaceCharPainter == null);
   
    ITextViewer viewer= getTextViewer();
    if (viewer instanceof ITextViewerExtension2) {
      fWhitespaceCharPainter= new WhitespaceCharacterPainter(viewer);
      ((ITextViewerExtension2)viewer).addPainter(fWhitespaceCharPainter);
    }
  }
View Full Code Here


    Assert.isTrue(fWhitespaceCharPainter == null);

    ITextViewer viewer= getTextViewer();
    if (viewer instanceof ITextViewerExtension2) {
      if (fStore != null) {
        fWhitespaceCharPainter= new WhitespaceCharacterPainter(viewer, fShowLeadingSpaces, fShowEnclosedSpaces, fShowTrailingSpaces, fShowLeadingIdeographicSpaces,
            fShowEnclosedIdeographicSpaces, fShowTrailingIdeographicSpace, fShowLeadingTabs, fShowEnclosedTabs, fShowTrailingTabs, fShowCarriageReturn, fShowLineFeed, fAlpha);
      } else {
        fWhitespaceCharPainter= new WhitespaceCharacterPainter(viewer);
      }
      ((ITextViewerExtension2)viewer).addPainter(fWhitespaceCharPainter);
    }
  }
View Full Code Here

      private void installPainter() {
        Assert.isTrue(whitespaceCharPainter == null);
        ITextViewer v = getTextViewer();
        if (v instanceof ITextViewerExtension2) {
          IPreferenceStore store = getStore();
          whitespaceCharPainter = new WhitespaceCharacterPainter(
              v,
              store.getBoolean(AbstractTextEditor.PREFERENCE_SHOW_LEADING_SPACES),
              store.getBoolean(AbstractTextEditor.PREFERENCE_SHOW_ENCLOSED_SPACES),
              store.getBoolean(AbstractTextEditor.PREFERENCE_SHOW_TRAILING_SPACES),
              store.getBoolean(AbstractTextEditor.PREFERENCE_SHOW_LEADING_IDEOGRAPHIC_SPACES),
View Full Code Here

    try {
      Map painters = getPainters();
      MergeSourceViewer[] viewers = getViewers();
      for (int i = 0; i < viewers.length; i++) {
        MergeSourceViewer viewer = viewers[i];
        WhitespaceCharacterPainter painter = new WhitespaceCharacterPainter(
            viewer);
        viewer.addPainter(painter);
        painters.put(viewer, painter);
      }
    } finally {
View Full Code Here

  private void hideWhitespace() {
    Map painters = getPainters();
    for (Entry entry : (Set<Entry>) painters.entrySet()) {
      MergeSourceViewer viewer = (MergeSourceViewer) entry.getKey();
      WhitespaceCharacterPainter painter = (WhitespaceCharacterPainter) entry
          .getValue();
      if (painter != null) {
        viewer.removePainter(painter);
        painter.deactivate(true);
      }
    }
    painters.clear();
    isWhitespaceShowing = false;
  }
View Full Code Here

TOP

Related Classes of org.eclipse.jface.text.WhitespaceCharacterPainter

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.