private void format( AbstractMethodDeclaration methodDeclaration, 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 { final int newLineBeforeChunk = isChunkStart ? this.preferences.blank_lines_before_new_chunk : 0; if (newLineBeforeChunk > 0) { this.scribe.printEmptyLines(newLineBeforeChunk); } } final int newLinesBeforeMethod = this.preferences.blank_lines_before_method; if (newLinesBeforeMethod > 0 && !isFirstClassBodyDeclaration) { this.scribe.printEmptyLines(newLinesBeforeMethod); } else if (this.scribe.line != 0 || this.scribe.column != 1) { this.scribe.printNewLine(); } methodDeclaration.traverse(this, scope); }
private void format( AbstractMethodDeclaration methodDeclaration, 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 { final int newLineBeforeChunk = isChunkStart ? this.preferences.blank_lines_before_new_chunk : 0; if (newLineBeforeChunk > 0) { this.scribe.printEmptyLines(newLineBeforeChunk); } } final int newLinesBeforeMethod = this.preferences.blank_lines_before_method; if (newLinesBeforeMethod > 0 && !isFirstClassBodyDeclaration) { this.scribe.printEmptyLines(newLinesBeforeMethod); } else if (this.scribe.line != 0 || this.scribe.column != 1) { this.scribe.printNewLine(); } methodDeclaration.traverse(this, scope); }
private void format( AbstractMethodDeclaration methodDeclaration, 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 { final int newLineBeforeChunk = isChunkStart ? this.preferences.blank_lines_before_new_chunk : 0; if (newLineBeforeChunk > 0) { this.scribe.printEmptyLines(newLineBeforeChunk); } } final int newLinesBeforeMethod = this.preferences.blank_lines_before_method; if (newLinesBeforeMethod > 0 && !isFirstClassBodyDeclaration) { this.scribe.printEmptyLines(newLinesBeforeMethod); } else if (this.scribe.line != 0 || this.scribe.column != 1) { this.scribe.printNewLine(); } methodDeclaration.traverse(this, scope); }
public Node convertConstructBody(String methodName) { AbstractMethodDeclaration method = CompilationUtils.findMethod(fCompilation.getCompilationUnit(), methodName); fRoot = new Node(JavaEntityType.METHOD, methodName); fRoot.setEntity(new SourceCodeEntity(methodName, JavaEntityType.METHOD, new SourceRange( method.declarationSourceStart, method.declarationSourceEnd))); //List<Comment> comments = CompilationUtils.extractComments(fCompilation); //Here initialize the visitor with parameters //sMethodBodyConverter.initialize(fRoot, method, comments, fCompilation.getScanner()); //Removed the <<comments>> argument from the previous statement sMethodBodyConverter.initialize(fRoot, method, null, fCompilation.getScanner()); //AbstractMethodDeclaration.traverse(ASTVisitor,ClassScope) method.traverse(sMethodBodyConverter, (ClassScope) null); return fRoot; }
int length = typeDeclaration.methods.length; for (int i = 0; i < length; i++) { typeDeclaration.methods[i].traverse(this, typeDeclaration.scope);
int length = this.methods.length; for (int i = 0; i < length; i++) this.methods[i].traverse(visitor, this.scope);
int length = this.methods.length; for (int i = 0; i < length; i++) this.methods[i].traverse(visitor, this.scope);
int length = this.methods.length; for (int i = 0; i < length; i++) this.methods[i].traverse(visitor, this.scope);
int length = this.methods.length; for (int i = 0; i < length; i++) this.methods[i].traverse(visitor, this.scope);
int length = this.methods.length; for (int i = 0; i < length; i++) this.methods[i].traverse(visitor, this.scope);
int length = this.methods.length; for (int i = 0; i < length; i++) this.methods[i].traverse(visitor, this.scope);
int length = this.methods.length; for (int i = 0; i < length; i++) this.methods[i].traverse(visitor, this.scope);
int length = this.methods.length; for (int i = 0; i < length; i++) this.methods[i].traverse(visitor, this.scope);
int length = this.methods.length; for (int i = 0; i < length; i++) this.methods[i].traverse(visitor, this.scope);
int length = this.methods.length; for (int i = 0; i < length; i++) this.methods[i].traverse(visitor, this.scope);
int length = this.methods.length; for (int i = 0; i < length; i++) this.methods[i].traverse(visitor, this.scope);
int length = this.methods.length; for (int i = 0; i < length; i++) this.methods[i].traverse(visitor, this.scope);
int length = this.methods.length; for (int i = 0; i < length; i++) this.methods[i].traverse(visitor, this.scope);
int length = this.methods.length; for (int i = 0; i < length; i++) this.methods[i].traverse(visitor, this.scope);
int length = this.methods.length; for (int i = 0; i < length; i++) this.methods[i].traverse(visitor, this.scope);