Package at.bestsolution.efxclipse.text.jface

Examples of at.bestsolution.efxclipse.text.jface.TextAttribute


//      System.err.println("REGION: " + System.identityHashCode(r) + " => " + r.getOffset() + "/" + r.getLength());
      if( scanner != null ) {
        int lastStart= r.getOffset();
        int length= 0;
        boolean firstToken= true;
        TextAttribute lastAttribute = null;
       
        scanner.setRange(document, r.getOffset(), r.getLength());
       
        while( true ) {
          IToken token= scanner.nextToken();
          if (token.isEOF())
            break;
         
          TextAttribute attribute = getTokenTextAttribute(token);
          if (lastAttribute != null && lastAttribute.equals(attribute)) {
            length += scanner.getTokenLength();
            firstToken= false;
          } else {
            if (!firstToken) {
View Full Code Here


public class TextAttributesManager {
 
  private Map<String, TextAttribute> color = new HashMap<>();
 
  public void registerToken(String tokenKey, Color fgColor) {
    this.color.put(tokenKey, new TextAttribute(fgColor, null, StyleRange.NORMAL, null));
  }
View Full Code Here

  public void registerToken(String tokenKey, Color fgColor) {
    this.color.put(tokenKey, new TextAttribute(fgColor, null, StyleRange.NORMAL, null));
  }
 
  public void registerToken(String tokenKey, Color fgColor, Color bgColor, Font font) {
    this.color.put(tokenKey, new TextAttribute(fgColor, bgColor, StyleRange.NORMAL, font));
  }
View Full Code Here

  private void addToken(String tokenKey) {
    fTokenMap.put(tokenKey, new Token(createTextAttribute(tokenKey)));
  }

  private TextAttribute createTextAttribute(String colorKey) {
    TextAttribute attribute = colorManager.getTokenAttribute(colorKey);
    return attribute == null ? new TextAttribute(null, null, StyleRange.NORMAL) : attribute;
  }
View Full Code Here

  public DefaultDamagerRepairer(ITokenScanner scanner) {

    Assert.isNotNull(scanner);

    fScanner= scanner;
    fDefaultTextAttribute= new TextAttribute(null);
  }
View Full Code Here

    int lastStart= region.getOffset();
    int length= 0;
    boolean firstToken= true;
    IToken lastToken= Token.UNDEFINED;
    TextAttribute lastAttribute= getTokenTextAttribute(lastToken);

    fScanner.setRange(fDocument, lastStart, region.getLength());

    while (true) {
      IToken token= fScanner.nextToken();
      if (token.isEOF())
        break;

      TextAttribute attribute= getTokenTextAttribute(token);
      if (lastAttribute != null && lastAttribute.equals(attribute)) {
        length += fScanner.getTokenLength();
        firstToken= false;
      } else {
        if (!firstToken)
View Full Code Here

TOP

Related Classes of at.bestsolution.efxclipse.text.jface.TextAttribute

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.