Package org.aspectj.org.eclipse.jdt.internal.compiler.ast

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.ast.Statement.traverse()


    for (int i = 0; i < statementsLength; i++) {
      final Statement statement = statements[i];
      if (i > 0 && (statements[i - 1] instanceof EmptyStatement) && !(statement instanceof EmptyStatement)) {
        this.scribe.printNewLine();
      }
      statement.traverse(this, scope);
      if (statement instanceof Expression) {
        this.scribe.printNextToken(TerminalTokens.TokenNameSEMICOLON, this.preferences.insert_space_before_semicolon);
        this.scribe.printTrailingComment();
        if (i != statementsLength - 1) {
          if (!(statement instanceof EmptyStatement) && !(statements[i + 1] instanceof EmptyStatement)) {
View Full Code Here


   
    final Statement action = doStatement.action;
    if (action != null) {
      if (action instanceof Block) {
        formatLeftCurlyBrace(line, this.preferences.brace_position_for_block);
        action.traverse(this, scope);
      } else if (action instanceof EmptyStatement) {
        /*
         * This is an empty statement
         */
        formatNecessaryEmptyStatement();
 
View Full Code Here

         */
        formatNecessaryEmptyStatement();
      } else {
        this.scribe.printNewLine();
        this.scribe.indent();
        action.traverse(this, scope);
        if (action instanceof Expression) {
          this.scribe.printNextToken(TerminalTokens.TokenNameSEMICOLON, this.preferences.insert_space_before_semicolon);
          this.scribe.printTrailingComment();
        }
        this.scribe.printNewLine();
View Full Code Here

   
    final Statement action = forStatement.action;
    if (action != null) {
      if (action instanceof Block) {
              formatLeftCurlyBrace(line, this.preferences.brace_position_for_block);
        action.traverse(this, scope);
      } else if (action instanceof EmptyStatement) {
        /*
         * This is an empty statement
         */
        formatNecessaryEmptyStatement();
 
View Full Code Here

         */
        formatNecessaryEmptyStatement();
      } else {
        this.scribe.indent();
        this.scribe.printNewLine();
        action.traverse(this, scope);
        this.scribe.unIndent();
      }
      if (action instanceof Expression) {
        this.scribe.printNextToken(TerminalTokens.TokenNameSEMICOLON, this.preferences.insert_space_before_semicolon);
        this.scribe.printTrailingComment();
View Full Code Here

   
    final Statement action = forStatement.action;
    if (action != null) {
      if (action instanceof Block) {
              formatLeftCurlyBrace(line, this.preferences.brace_position_for_block);
        action.traverse(this, scope);
      } else if (action instanceof EmptyStatement) {
        /*
         * This is an empty statement
         */
        formatNecessaryEmptyStatement();
 
View Full Code Here

         */
        formatNecessaryEmptyStatement();
      } else {
        this.scribe.indent();
        this.scribe.printNewLine();
        action.traverse(this, scope);
        this.scribe.unIndent();
      }
      if (action instanceof Expression) {
        this.scribe.printNextToken(TerminalTokens.TokenNameSEMICOLON, this.preferences.insert_space_before_semicolon);
        this.scribe.printTrailingComment();
View Full Code Here

        this.scribe.printNextToken(TerminalTokens.TokenNameelse, this.preferences.insert_space_after_closing_brace_in_block);
      } else {
        this.scribe.printNextToken(TerminalTokens.TokenNameelse, true);
      }
      if (elseStatement instanceof Block) {
        elseStatement.traverse(this, scope);
      } else if (elseStatement instanceof IfStatement) {
        if (!this.preferences.compact_else_if) {
          this.scribe.printNewLine();
          this.scribe.indent();
        }
View Full Code Here

        if (!this.preferences.compact_else_if) {
          this.scribe.printNewLine();
          this.scribe.indent();
        }
        this.scribe.space();
        elseStatement.traverse(this, scope);
        if (!this.preferences.compact_else_if) {
          this.scribe.unIndent();
        }
      } else if (this.preferences.keep_else_statement_on_same_line) {
        this.scribe.space();
View Full Code Here

        if (!this.preferences.compact_else_if) {
          this.scribe.unIndent();
        }
      } else if (this.preferences.keep_else_statement_on_same_line) {
        this.scribe.space();
        elseStatement.traverse(this, scope);
        if (elseStatement instanceof Expression) {
          this.scribe.printNextToken(TerminalTokens.TokenNameSEMICOLON, this.preferences.insert_space_before_semicolon);
          this.scribe.printTrailingComment();
        }
      } else {
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.