private void format( TypeDeclaration memberTypeDeclaration, ClassScope scope, boolean isChunkStart, boolean isFirstClassBodyDeclaration) { if (isFirstClassBodyDeclaration) { int newLinesBeforeFirstClassBodyDeclaration = this.preferences.blank_lines_before_first_class_body_declaration; if (newLinesBeforeFirstClassBodyDeclaration > 0) { this.scribe.printEmptyLines(newLinesBeforeFirstClassBodyDeclaration); } } else { int newLineBeforeChunk = isChunkStart ? this.preferences.blank_lines_before_new_chunk : 0; if (newLineBeforeChunk > 0) { this.scribe.printEmptyLines(newLineBeforeChunk); } final int newLinesBeforeMember = this.preferences.blank_lines_before_member_type; if (newLinesBeforeMember > 0) { this.scribe.printEmptyLines(newLinesBeforeMember); } } memberTypeDeclaration.traverse(this, scope); }
private void format( TypeDeclaration memberTypeDeclaration, ClassScope scope, boolean isChunkStart, boolean isFirstClassBodyDeclaration) { if (isFirstClassBodyDeclaration) { int newLinesBeforeFirstClassBodyDeclaration = this.preferences.blank_lines_before_first_class_body_declaration; if (newLinesBeforeFirstClassBodyDeclaration > 0) { this.scribe.printEmptyLines(newLinesBeforeFirstClassBodyDeclaration); } } else { int newLineBeforeChunk = isChunkStart ? this.preferences.blank_lines_before_new_chunk : 0; if (newLineBeforeChunk > 0) { this.scribe.printEmptyLines(newLineBeforeChunk); } final int newLinesBeforeMember = this.preferences.blank_lines_before_member_type; if (newLinesBeforeMember > 0) { this.scribe.printEmptyLines(newLinesBeforeMember); } } memberTypeDeclaration.traverse(this, scope); }
private void format( TypeDeclaration memberTypeDeclaration, ClassScope scope, boolean isChunkStart, boolean isFirstClassBodyDeclaration) { if (isFirstClassBodyDeclaration) { int newLinesBeforeFirstClassBodyDeclaration = this.preferences.blank_lines_before_first_class_body_declaration; if (newLinesBeforeFirstClassBodyDeclaration > 0) { this.scribe.printEmptyLines(newLinesBeforeFirstClassBodyDeclaration); } } else { int newLineBeforeChunk = isChunkStart ? this.preferences.blank_lines_before_new_chunk : 0; if (newLineBeforeChunk > 0) { this.scribe.printEmptyLines(newLineBeforeChunk); } final int newLinesBeforeMember = this.preferences.blank_lines_before_member_type; if (newLinesBeforeMember > 0) { this.scribe.printEmptyLines(newLinesBeforeMember); } } memberTypeDeclaration.traverse(this, scope); }
@Override public boolean visit(QualifiedAllocationExpression qualifiedAllocationExpression, BlockScope scope) { // anonymous class if (qualifiedAllocationExpression.anonymousType != null) { buildCommonPartForCtNewClassAndCtConstructorCall(qualifiedAllocationExpression, scope, factory.Core().createNewClass()); qualifiedAllocationExpression.anonymousType.traverse(this, scope); } else { // constructor call buildCommonPartForCtNewClassAndCtConstructorCall(qualifiedAllocationExpression, scope, factory.Core().createConstructorCall()); } if (qualifiedAllocationExpression.enclosingInstance != null) { qualifiedAllocationExpression.enclosingInstance.traverse(this, scope); } return false; }
public void traverse(ASTVisitor visitor, BlockScope scope) { if (visitor.visit(this, scope)) { if (this.enclosingInstance != null) this.enclosingInstance.traverse(visitor, scope); if (this.typeArguments != null) { for (int i = 0, typeArgumentsLength = this.typeArguments.length; i < typeArgumentsLength; i++) { this.typeArguments[i].traverse(visitor, scope); } } if (this.type != null) // case of enum constant this.type.traverse(visitor, scope); if (this.arguments != null) { int argumentsLength = this.arguments.length; for (int i = 0; i < argumentsLength; i++) this.arguments[i].traverse(visitor, scope); } if (this.anonymousType != null) this.anonymousType.traverse(visitor, scope); } visitor.endVisit(this, scope); } }
@Override public void traverse(ASTVisitor visitor, BlockScope scope) { if (visitor.visit(this, scope)) { if (this.enclosingInstance != null) this.enclosingInstance.traverse(visitor, scope); if (this.typeArguments != null) { for (int i = 0, typeArgumentsLength = this.typeArguments.length; i < typeArgumentsLength; i++) { this.typeArguments[i].traverse(visitor, scope); } } if (this.type != null) // case of enum constant this.type.traverse(visitor, scope); if (this.arguments != null) { int argumentsLength = this.arguments.length; for (int i = 0; i < argumentsLength; i++) this.arguments[i].traverse(visitor, scope); } if (this.anonymousType != null) this.anonymousType.traverse(visitor, scope); } visitor.endVisit(this, scope); } }
public void traverse(ASTVisitor visitor, BlockScope scope) { if (visitor.visit(this, scope)) { if (this.enclosingInstance != null) this.enclosingInstance.traverse(visitor, scope); if (this.typeArguments != null) { for (int i = 0, typeArgumentsLength = this.typeArguments.length; i < typeArgumentsLength; i++) { this.typeArguments[i].traverse(visitor, scope); } } if (this.type != null) // case of enum constant this.type.traverse(visitor, scope); if (this.arguments != null) { int argumentsLength = this.arguments.length; for (int i = 0; i < argumentsLength; i++) this.arguments[i].traverse(visitor, scope); } if (this.anonymousType != null) this.anonymousType.traverse(visitor, scope); } visitor.endVisit(this, scope); } }
public void traverse(ASTVisitor visitor, BlockScope scope) { if (visitor.visit(this, scope)) { if (this.enclosingInstance != null) this.enclosingInstance.traverse(visitor, scope); if (this.typeArguments != null) { for (int i = 0, typeArgumentsLength = this.typeArguments.length; i < typeArgumentsLength; i++) { this.typeArguments[i].traverse(visitor, scope); } } if (this.type != null) // case of enum constant this.type.traverse(visitor, scope); if (this.arguments != null) { int argumentsLength = this.arguments.length; for (int i = 0; i < argumentsLength; i++) this.arguments[i].traverse(visitor, scope); } if (this.anonymousType != null) this.anonymousType.traverse(visitor, scope); } visitor.endVisit(this, scope); } }
public void traverse(ASTVisitor visitor, BlockScope scope) { if (visitor.visit(this, scope)) { if (this.enclosingInstance != null) this.enclosingInstance.traverse(visitor, scope); if (this.typeArguments != null) { for (int i = 0, typeArgumentsLength = this.typeArguments.length; i < typeArgumentsLength; i++) { this.typeArguments[i].traverse(visitor, scope); } } if (this.type != null) // case of enum constant this.type.traverse(visitor, scope); if (this.arguments != null) { int argumentsLength = this.arguments.length; for (int i = 0; i < argumentsLength; i++) this.arguments[i].traverse(visitor, scope); } if (this.anonymousType != null) this.anonymousType.traverse(visitor, scope); } visitor.endVisit(this, scope); } }
public void traverse(ASTVisitor visitor, BlockScope scope) { if (visitor.visit(this, scope)) { if (this.enclosingInstance != null) this.enclosingInstance.traverse(visitor, scope); if (this.typeArguments != null) { for (int i = 0, typeArgumentsLength = this.typeArguments.length; i < typeArgumentsLength; i++) { this.typeArguments[i].traverse(visitor, scope); } } if (this.type != null) // case of enum constant this.type.traverse(visitor, scope); if (this.arguments != null) { int argumentsLength = this.arguments.length; for (int i = 0; i < argumentsLength; i++) this.arguments[i].traverse(visitor, scope); } if (this.anonymousType != null) this.anonymousType.traverse(visitor, scope); } visitor.endVisit(this, scope); } }
public void traverse(ASTVisitor visitor, BlockScope scope) { if (visitor.visit(this, scope)) { if (this.enclosingInstance != null) this.enclosingInstance.traverse(visitor, scope); if (this.typeArguments != null) { for (int i = 0, typeArgumentsLength = this.typeArguments.length; i < typeArgumentsLength; i++) { this.typeArguments[i].traverse(visitor, scope); } } if (this.type != null) // case of enum constant this.type.traverse(visitor, scope); if (this.arguments != null) { int argumentsLength = this.arguments.length; for (int i = 0; i < argumentsLength; i++) this.arguments[i].traverse(visitor, scope); } if (this.anonymousType != null) this.anonymousType.traverse(visitor, scope); } visitor.endVisit(this, scope); } }
public void traverse(ASTVisitor visitor, BlockScope scope) { if (visitor.visit(this, scope)) { if (this.enclosingInstance != null) this.enclosingInstance.traverse(visitor, scope); if (this.typeArguments != null) { for (int i = 0, typeArgumentsLength = this.typeArguments.length; i < typeArgumentsLength; i++) { this.typeArguments[i].traverse(visitor, scope); } } if (this.type != null) // case of enum constant this.type.traverse(visitor, scope); if (this.arguments != null) { int argumentsLength = this.arguments.length; for (int i = 0; i < argumentsLength; i++) this.arguments[i].traverse(visitor, scope); } if (this.anonymousType != null) this.anonymousType.traverse(visitor, scope); } visitor.endVisit(this, scope); } }
public void traverse(ASTVisitor visitor, BlockScope scope) { if (visitor.visit(this, scope)) { if (this.enclosingInstance != null) this.enclosingInstance.traverse(visitor, scope); if (this.typeArguments != null) { for (int i = 0, typeArgumentsLength = this.typeArguments.length; i < typeArgumentsLength; i++) { this.typeArguments[i].traverse(visitor, scope); } } if (this.type != null) // case of enum constant this.type.traverse(visitor, scope); if (this.arguments != null) { int argumentsLength = this.arguments.length; for (int i = 0; i < argumentsLength; i++) this.arguments[i].traverse(visitor, scope); } if (this.anonymousType != null) this.anonymousType.traverse(visitor, scope); } visitor.endVisit(this, scope); } }
public void traverse(ASTVisitor visitor, BlockScope scope) { if (visitor.visit(this, scope)) { if (this.enclosingInstance != null) this.enclosingInstance.traverse(visitor, scope); if (this.typeArguments != null) { for (int i = 0, typeArgumentsLength = this.typeArguments.length; i < typeArgumentsLength; i++) { this.typeArguments[i].traverse(visitor, scope); } } if (this.type != null) // case of enum constant this.type.traverse(visitor, scope); if (this.arguments != null) { int argumentsLength = this.arguments.length; for (int i = 0; i < argumentsLength; i++) this.arguments[i].traverse(visitor, scope); } if (this.anonymousType != null) this.anonymousType.traverse(visitor, scope); } visitor.endVisit(this, scope); } }
public void traverse(ASTVisitor visitor, BlockScope scope) { if (visitor.visit(this, scope)) { if (this.enclosingInstance != null) this.enclosingInstance.traverse(visitor, scope); if (this.typeArguments != null) { for (int i = 0, typeArgumentsLength = this.typeArguments.length; i < typeArgumentsLength; i++) { this.typeArguments[i].traverse(visitor, scope); } } if (this.type != null) // case of enum constant this.type.traverse(visitor, scope); if (this.arguments != null) { int argumentsLength = this.arguments.length; for (int i = 0; i < argumentsLength; i++) this.arguments[i].traverse(visitor, scope); } if (this.anonymousType != null) this.anonymousType.traverse(visitor, scope); } visitor.endVisit(this, scope); } }
int typesLength = this.types.length; for (int i = 0; i < typesLength; i++) { this.types[i].traverse(visitor, this.scope);
TypeDeclaration memberType = memberTypes[i]; this.parseBodies(memberType, unit); memberType.traverse(this.localDeclarationVisitor, (ClassScope) null);
TypeDeclaration memberType = memberTypes[i]; this.parseBodies(memberType, unit); memberType.traverse(this.localDeclarationVisitor, (ClassScope) null);
TypeDeclaration memberType = memberTypes[i]; this.parseBodies(memberType, unit); memberType.traverse(this.localDeclarationVisitor, (ClassScope) null);
TypeDeclaration memberType = memberTypes[i]; this.parseBodies(memberType, unit); memberType.traverse(this.localDeclarationVisitor, (ClassScope) null);