Examples of traverse()


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

      int[] operators = builder.operators();
      do {
        try {
          for (int i = 0; i < fragmentsSize - 1; i++) {
            ASTNode fragment = fragments[i];
            fragment.traverse(this, scope);
            this.scribe.printTrailingComment();
            if (this.scribe.lastNumberOfNewLines == 1) {
              // a new line has been inserted by printTrailingComment()
              this.scribe.indentationLevel = binaryExpressionAlignment.breakIndentationLevel;
            }
View Full Code Here

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

          this.scribe.printNextToken(TerminalTokens.TokenNameRBRACKET, this.preferences.insert_space_between_empty_brackets_in_array_allocation_expression);
        }
      }
      final ArrayInitializer initializer = arrayAllocationExpression.initializer;
      if (initializer != null) {
        initializer.traverse(this, scope);
      }

      if (numberOfParens > 0) {
        manageClosingParenthesizedExpression(arrayAllocationExpression, numberOfParens);
      }
View Full Code Here

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

      if (searchPosition < 0 || searchPosition > source.length) {
        // the position is out of range. There is no need to search for a node.
         return compilationUnitDeclaration;
      }

      compilationUnitDeclaration.traverse(nodeSearcher, compilationUnitDeclaration.scope);

      org.aspectj.org.eclipse.jdt.internal.compiler.ast.ASTNode node = nodeSearcher.found;
       if (node == null) {
         return compilationUnitDeclaration;
       }
View Full Code Here

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

    this.lastLocalDeclarationSourceStart = -1;
    try {
      ExplicitConstructorCall explicitConstructorCall = constructorDeclaration.constructorCall;
      if (explicitConstructorCall != null && !explicitConstructorCall.isImplicitSuper()) {
        explicitConstructorCall.traverse(this, null);
      }
      Statement[] statements = constructorDeclaration.statements;
      if (statements != null) {
        formatStatements(null, statements, false);
      }
View Full Code Here

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

          do {
            try {
              for (int i = 0; i < enumConstantsLength; i++) {
                this.scribe.alignFragment(enumConstantsAlignment, i);
                FieldDeclaration fieldDeclaration = fieldDeclarations[i];
                fieldDeclaration.traverse(this, typeDeclaration.initializerScope);
                if (isNextToken(TerminalTokens.TokenNameCOMMA)) {
                  this.scribe.printNextToken(TerminalTokens.TokenNameCOMMA, this.preferences.insert_space_before_comma_in_enum_declarations);
                  if (this.preferences.insert_space_after_comma_in_enum_declarations) {
                    this.scribe.space();
                  }
View Full Code Here

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

                if (newLinesBeforeFirstClassBodyDeclaration > 0) {
                  this.scribe.printEmptyLines(newLinesBeforeFirstClassBodyDeclaration);
                }
              }
              Initializer initializer = (Initializer) member;
              initializer.traverse(this, null);
            } else {
              FieldDeclaration field = (FieldDeclaration) member;
              format(field, this, null, isChunkStart, i == 0);
            }
          } else if (member instanceof AbstractMethodDeclaration) {
View Full Code Here

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

              }
              Initializer initializer = (Initializer) member;
              if (initializer.isStatic()) {
                initializer.traverse(this, typeDeclaration.staticInitializerScope);
              } else {
                initializer.traverse(this, typeDeclaration.initializerScope);
              }         
            } else {
              FieldDeclaration field = (FieldDeclaration) member;
              if (field.isStatic()) {
                format(field, this, typeDeclaration.staticInitializerScope, isChunkStart, i == 0);
View Full Code Here

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

      int from,
      char[][] discouragedNames,
      UnresolvedReferenceNameRequestor nameRequestor) {
    MethodDeclaration fakeMethod =
      this.findAfter(startWith, scope, from, initializer.bodyEnd, MAX_LINE_COUNT, false, discouragedNames, nameRequestor);
    if (fakeMethod != null) fakeMethod.traverse(this, scope);
  }
 
  public void find(
      char[] startWith,
      AbstractMethodDeclaration methodDeclaration,
View Full Code Here

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

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

   
    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
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.