Examples of ITokenFactory


Examples of cbg.editor.rules.ITokenFactory

    List rules = new ArrayList();
   
    String colorName = colorManager.colorForType(rule.getDefaultTokenType());
    IToken defaultToken = newToken(colorName);
    scanner.setDefaultReturnToken(defaultToken);
    ColoringEditorTools.add(rule, rules, new ITokenFactory() {
      public IToken makeToken(Type type) {
        String color = colorManager.colorForType(type.getColor());
        return newToken(color);
      }
    });
View Full Code Here

Examples of cbg.editor.rules.ITokenFactory

    setPredicateRules(createRuleSet(mode.getDefaultRuleSet()));
  }

  private IPredicateRule[] createRuleSet(Rule rule) {
    List rules = new ArrayList();
    ColoringEditorTools.add(rule, rules, new ITokenFactory() {
      public IToken makeToken(Type type) {
        return new CToken(type);
      }
    });
    return (IPredicateRule[]) rules.toArray(new IPredicateRule[rules.size()]);
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.