Package org.apache.uima.ruta.ide.parser.ast

Examples of org.apache.uima.ruta.ide.parser.ast.RutaDeclarationsStatement


    appendComments(s);
    fillNewLines(s);

    if (s instanceof RutaDeclarationsStatement) {
      // append new lines before LONG DECLARATIONS
      RutaDeclarationsStatement decls = (RutaDeclarationsStatement) s;
      // if (decls.getDeclarationsCount() > NL_DECLS_COUNT) {
      // for (int i = 0; i < lines_before_long_declarations; i++) {
      // appendNewLine();
      // }
      // }
      // format declarations:
      // print type token
      appendIntoNewLine(document.get(decls.getTypeTokenStart(), decls.getTypeTokenEnd()) + " ");
      // print parent if available
      if (s instanceof RutaDeclareDeclarationsStatement) {
        RutaDeclareDeclarationsStatement dds = (RutaDeclareDeclarationsStatement) s;
        ASTNode p = dds.getParent();
        if (p != null) {
          append(p);
          append(" ");
        }
      }
      // print identifiers
      List<RutaAbstractDeclaration> declarations = decls.getDeclarations();
      traverseAstNodes(declarations);
      // print init expr
      if (decls.getInitExpr() != null) {
        append(EQUALS);
        decls.getInitExpr().traverse(this);
      }
      appendStatementEnd();
      return false;
    }
    if (s instanceof RutaRegExpRule) {
View Full Code Here


    appendComments(s);
    fillNewLines(s);

    if (s instanceof RutaDeclarationsStatement) {
      // append new lines before LONG DECLARATIONS
      RutaDeclarationsStatement decls = (RutaDeclarationsStatement) s;
      // if (decls.getDeclarationsCount() > NL_DECLS_COUNT) {
      // for (int i = 0; i < lines_before_long_declarations; i++) {
      // appendNewLine();
      // }
      // }
      // format declarations:
      // print type token
      appendIntoNewLine(document.get(decls.getTypeTokenStart(), decls.getTypeTokenEnd()) + " ");
      // print parent if available
      if (s instanceof RutaDeclareDeclarationsStatement) {
        RutaDeclareDeclarationsStatement dds = (RutaDeclareDeclarationsStatement) s;
        ASTNode p = dds.getParent();
        if (p != null) {
          append(p);
          append(" ");
        }
      }
      // print identifiers
      List<RutaAbstractDeclaration> declarations = decls.getDeclarations();
      traverseAstNodes(declarations);
      // print init expr
      if (decls.getInitExpr() != null) {
        append(EQUALS);
        decls.getInitExpr().traverse(this);
      }
      appendStatementEnd();
      return false;
    }
    if (s instanceof RutaRule) {
View Full Code Here

TOP

Related Classes of org.apache.uima.ruta.ide.parser.ast.RutaDeclarationsStatement

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.