Package com.puppetlabs.geppetto.pp.dsl.services.PPGrammarAccess

Examples of com.puppetlabs.geppetto.pp.dsl.services.PPGrammarAccess.LiteralHashElements


    Iterator<IDomNode> itor = node.treeIterator();
    Map<IDomNode, Integer> operatorNodes = Maps.newHashMap();
    IntegerCluster cluster = new IntegerCluster(clusterWidth);

    final LiteralHashElements access = grammarAccess.getLiteralHashAccess();
    final HashEntryElements hashAccess = grammarAccess.getHashEntryAccess();
    int previousKeyWidth = 0;
    while(itor.hasNext()) {
      IDomNode n = itor.next();
      EObject ge = n.getGrammarElement();
      if(ge == access.getLeftCurlyBracketKeyword_1()) {
        IDomNode nextLeaf = DomModelUtils.nextWhitespace(n);
        if(DomModelUtils.isWhitespace(nextLeaf) && breakAndAlign)
          nextLeaf.getStyles().add(StyleSet.withStyles(styles.oneLineBreak()));
      }
      else if(breakAndAlign) {
        if(ge == access.getCommaKeyword_2_1_0()) {
          IDomNode nextLeaf = DomModelUtils.nextWhitespace(n);
          if(DomModelUtils.isWhitespace(nextLeaf))
            nextLeaf.getStyles().add(StyleSet.withStyles(styles.oneLineBreak()));
        }
        else if(ge == hashAccess.getKeyLiteralNameOrStringParserRuleCall_0_0()) {
View Full Code Here

TOP

Related Classes of com.puppetlabs.geppetto.pp.dsl.services.PPGrammarAccess.LiteralHashElements

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.