@Override public boolean visit(ModuleDeclaration node) { handleToken(node.getName(), TokenNameLBRACE, this.options.insert_space_before_opening_brace_in_type_declaration, false); return true; }
@Override public boolean visit(ModuleDeclaration node) { handleToken(node.getName(), TokenNameLBRACE, this.options.insert_space_before_opening_brace_in_type_declaration, false); return true; }
@Override public boolean visit(ModuleDeclaration node) { handleToken(node.getName(), TokenNameLBRACE, this.options.insert_space_before_opening_brace_in_type_declaration, false); return true; }
@Override public boolean visit(ModuleDeclaration node) { if (found(node, node.getName()) && this.resolveBinding) { this.foundBinding = node.resolveBinding(); } return true; } @Override
public boolean visit(ModuleDeclaration node) { if (found(node, node.getName()) && this.resolveBinding) { this.foundBinding = node.resolveBinding(); } return true; } public boolean visit(NormalAnnotation node) {
@Override public void endVisit(ModuleDeclaration node) { tryKeepOnOneLine(node, node.getName(), node.moduleStatements(), this.options.keep_type_declaration_on_one_line); }
@Override public boolean visit(ModuleDeclaration node) { // using settings for type declaration and fields for now, add new settings if necessary breakLineBefore(node); handleBracedCode(node, node.getName(), this.options.brace_position_for_type_declaration, this.options.indent_body_declarations_compare_to_type_header, this.options.insert_new_line_in_empty_type_declaration); List<ModuleDirective> statements = node.moduleStatements(); ModuleDirective previous = null; for (ModuleDirective statement : statements) { int blankLines = previous == null ? this.options.blank_lines_before_first_class_body_declaration : previous.getClass().equals(statement.getClass()) ? this.options.blank_lines_before_field : this.options.blank_lines_before_new_chunk; putBlankLinesBefore(statement, blankLines); previous = statement; } this.declarationModifierVisited = false; return true; }
@Override public boolean visit(ModuleDeclaration node) { // using settings for type declaration and fields for now, add new settings if necessary breakLineBefore(node); handleBracedCode(node, node.getName(), this.options.brace_position_for_type_declaration, this.options.indent_body_declarations_compare_to_type_header, this.options.insert_new_line_in_empty_type_declaration); List<ModuleDirective> statements = node.moduleStatements(); ModuleDirective previous = null; for (ModuleDirective statement : statements) { int blankLines = previous == null ? this.options.blank_lines_before_first_class_body_declaration : previous.getClass().equals(statement.getClass()) ? this.options.blank_lines_before_field : this.options.blank_lines_before_new_chunk; putBlankLinesBefore(statement, blankLines); previous = statement; } this.declarationModifierVisited = false; return true; }
@Override public boolean visit(ModuleDeclaration node) { // using settings for type declaration and fields for now, add new settings if necessary breakLineBefore(node); handleBracedCode(node, node.getName(), this.options.brace_position_for_type_declaration, this.options.indent_body_declarations_compare_to_type_header); List<ModuleDirective> statements = node.moduleStatements(); ModuleDirective previous = null; for (ModuleDirective statement : statements) { int blankLines = previous == null ? this.options.blank_lines_before_first_class_body_declaration : previous.getClass().equals(statement.getClass()) ? this.options.blank_lines_before_field : this.options.blank_lines_before_new_chunk; putBlankLinesBefore(statement, blankLines); previous = statement; } this.declarationModifierVisited = false; return true; }
@Override public boolean visit(ModuleDeclaration node) { if (node.getJavadoc() != null) { node.getJavadoc().accept(this); } printModifiers(node.annotations()); if (node.isOpen()) this.buffer.append("open "); //$NON-NLS-1$ this.buffer.append("module"); //$NON-NLS-1$ this.buffer.append(" "); //$NON-NLS-1$ node.getName().accept(this); this.buffer.append(" {\n"); //$NON-NLS-1$ this.indent++; for (ModuleDirective stmt : (List<ModuleDirective>)node.moduleStatements()) { stmt.accept(this); } this.indent--; this.buffer.append("}"); //$NON-NLS-1$ return false; }
@Override public boolean visit(ModuleDeclaration node) { if (node.getJavadoc() != null) { node.getJavadoc().accept(this); } printModifiers(node.annotations()); if (node.isOpen()) this.fBuffer.append("open "); //$NON-NLS-1$ this.fBuffer.append("module"); //$NON-NLS-1$ this.fBuffer.append(" "); //$NON-NLS-1$ node.getName().accept(this); this.fBuffer.append(" {\n"); //$NON-NLS-1$ for (ModuleDirective stmt : (List<ModuleDirective>)node.moduleStatements()) { stmt.accept(this); } this.fBuffer.append("}"); //$NON-NLS-1$ return false; }
@Override public boolean visit(ModuleDeclaration node) { if (node.getJavadoc() != null) { node.getJavadoc().accept(this); } printModifiers(node.annotations()); if (node.isOpen()) this.buffer.append("open "); //$NON-NLS-1$ this.buffer.append("module"); //$NON-NLS-1$ this.buffer.append(" "); //$NON-NLS-1$ node.getName().accept(this); this.buffer.append(" {\n"); //$NON-NLS-1$ this.indent++; for (ModuleDirective stmt : (List<ModuleDirective>)node.moduleStatements()) { stmt.accept(this); } this.indent--; this.buffer.append("}"); //$NON-NLS-1$ return false; }
final ASTNode internalGetSetChildProperty(ChildPropertyDescriptor property, boolean get, ASTNode child) { if (property == JAVADOC_PROPERTY) { if (get) { return getJavadoc(); } else { setJavadoc((Javadoc) child); return null; } } if (property == NAME_PROPERTY) { if (get) { return getName(); } else { setName((Name) child); return null; } } // allow default implementation to flag the error return super.internalGetSetChildProperty(property, get, child); }
@Override final ASTNode internalGetSetChildProperty(ChildPropertyDescriptor property, boolean get, ASTNode child) { if (property == JAVADOC_PROPERTY) { if (get) { return getJavadoc(); } else { setJavadoc((Javadoc) child); return null; } } if (property == NAME_PROPERTY) { if (get) { return getName(); } else { setName((Name) child); return null; } } // allow default implementation to flag the error return super.internalGetSetChildProperty(property, get, child); }
@Override int treeSize() { return memSize() + (this.optionalDocComment == null ? 0 : getJavadoc().treeSize()) + this.annotations.listSize() + (this.name == null ? 0 : getName().treeSize()) + this.moduleStatements.listSize(); } }
@Override int treeSize() { return memSize() + (this.optionalDocComment == null ? 0 : getJavadoc().treeSize()) + this.annotations.listSize() + (this.name == null ? 0 : getName().treeSize()) + this.moduleStatements.listSize(); } }
@Override void accept0(ASTVisitor visitor) { boolean visitChildren = visitor.visit(this); if (visitChildren) { // visit children in normal left to right reading order acceptChild(visitor, getJavadoc()); acceptChildren(visitor, this.annotations); acceptChild(visitor, getName()); acceptChildren(visitor, this.moduleStatements); } visitor.endVisit(this); } /**
@Override void accept0(ASTVisitor visitor) { boolean visitChildren = visitor.visit(this); if (visitChildren) { // visit children in normal left to right reading order acceptChild(visitor, getJavadoc()); acceptChildren(visitor, this.annotations); acceptChild(visitor, getName()); acceptChildren(visitor, this.moduleStatements); } visitor.endVisit(this); } /**
@SuppressWarnings("unchecked") @Override ASTNode clone0(AST target) { ModuleDeclaration result = new ModuleDeclaration(target); result.setSourceRange(getStartPosition(), getLength()); result.setJavadoc((Javadoc) ASTNode.copySubtree(target, getJavadoc())); result.setOpen(isOpen()); result.annotations().addAll(ASTNode.copySubtrees(target, annotations())); result.setName((SimpleName) getName().clone(target)); result.moduleStatements().addAll(ASTNode.copySubtrees(target, moduleStatements())); return result; }
@SuppressWarnings("unchecked") @Override ASTNode clone0(AST target) { ModuleDeclaration result = new ModuleDeclaration(target); result.setSourceRange(getStartPosition(), getLength()); result.setJavadoc((Javadoc) ASTNode.copySubtree(target, getJavadoc())); result.setOpen(isOpen()); result.annotations().addAll(ASTNode.copySubtrees(target, annotations())); result.setName((SimpleName) getName().clone(target)); result.moduleStatements().addAll(ASTNode.copySubtrees(target, moduleStatements())); return result; }