/** * Creates and returns a new block comment placeholder node. * <p> * Note that this node type is used to recording the source * range where a comment was found in the source string. * These comment nodes are normally found (only) in * {@linkplain CompilationUnit#getCommentList() * the comment table} for parsed compilation units. * </p> * * @return a new unparented block comment node * @since 3.0 */ public BlockComment newBlockComment() { BlockComment result = new BlockComment(this); return result; }
/** * Creates and returns a new block comment placeholder node. * <p> * Note that this node type is used to recording the source * range where a comment was found in the source string. * These comment nodes are normally found (only) in * {@linkplain CompilationUnit#getCommentList() * the comment table} for parsed compilation units. * </p> * * @return a new unparented block comment node * @since 3.0 */ public BlockComment newBlockComment() { BlockComment result = new BlockComment(this); return result; }
/** * Creates and returns a new block comment placeholder node. * <p> * Note that this node type is used to recording the source * range where a comment was found in the source string. * These comment nodes are normally found (only) in * {@linkplain CompilationUnit#getCommentList() * the comment table} for parsed compilation units. * </p> * * @return a new unparented block comment node * @since 3.0 */ public BlockComment newBlockComment() { BlockComment result = new BlockComment(this); return result; }
/** * Creates and returns a new block comment placeholder node. * <p> * Note that this node type is used to recording the source * range where a comment was found in the source string. * These comment nodes are normally found (only) in * {@linkplain CompilationUnit#getCommentList() * the comment table} for parsed compilation units. * </p> * * @return a new unparented block comment node * @since 3.0 */ public BlockComment newBlockComment() { BlockComment result = new BlockComment(this); return result; }
/** * Creates and returns a new block comment placeholder node. * <p> * Note that this node type is used to recording the source * range where a comment was found in the source string. * These comment nodes are normally found (only) in * {@linkplain CompilationUnit#getCommentList() * the comment table} for parsed compilation units. * </p> * * @return a new unparented block comment node * @since 3.0 */ public BlockComment newBlockComment() { BlockComment result = new BlockComment(this); return result; }
/** * Creates and returns a new block comment placeholder node. * <p> * Note that this node type is used to recording the source * range where a comment was found in the source string. * These comment nodes are normally found (only) in * {@linkplain CompilationUnit#getCommentList() * the comment table} for parsed compilation units. * </p> * * @return a new unparented block comment node * @since 3.0 */ public BlockComment newBlockComment() { BlockComment result = new BlockComment(this); return result; }
@Override ASTNode clone0(AST target) { BlockComment result = new BlockComment(target); result.setSourceRange(getStartPosition(), getLength()); return result; }
public Node visit(ClassOrInterfaceDeclaration n, Object arg) { if (!n.isInterface()) { n.setComment(new BlockComment(" this is a class ")); n.setComment(new BlockComment(" this is a method ")); return super.visit(n, arg);
ASTNode clone0(AST target) { BlockComment result = new BlockComment(target); result.setSourceRange(getStartPosition(), getLength()); return result; }
ASTNode clone0(AST target) { BlockComment result = new BlockComment(target); result.setSourceRange(getStartPosition(), getLength()); return result; }
ASTNode clone0(AST target) { BlockComment result = new BlockComment(target); result.setSourceRange(getStartPosition(), getLength()); return result; }
ASTNode clone0(AST target) { BlockComment result = new BlockComment(target); result.setSourceRange(getStartPosition(), getLength()); return result; }
ASTNode clone0(AST target) { BlockComment result = new BlockComment(target); result.setSourceRange(getStartPosition(), getLength()); return result; }
protected Comment createComment(int[] positions) { // Create comment node Comment comment = null; int start = positions[0]; int end = positions[1]; if (positions[1]>0) { // Javadoc comments have positive end position Javadoc docComment = this.docParser.parse(positions); if (docComment == null) return null; comment = docComment; } else { end = -end; if (positions[0] == 0) { // we cannot know without testing chars again if (this.docParser.scanner.source[1] == '/') { comment = new LineComment(this.ast); } else { comment = new BlockComment(this.ast); } } else if (positions[0]>0) { // Block comment have positive start position comment = new BlockComment(this.ast); } else { // Line comment have negative start and end position start = -start; comment = new LineComment(this.ast); } comment.setSourceRange(start, end - start); } return comment; }
protected Comment createComment(int[] positions) { // Create comment node Comment comment = null; int start = positions[0]; int end = positions[1]; if (positions[1]>0) { // Javadoc comments have positive end position Javadoc docComment = this.docParser.parse(positions); if (docComment == null) return null; comment = docComment; } else { end = -end; if (positions[0] == 0) { // we cannot know without testing chars again if (this.docParser.scanner.source[1] == '/') { comment = new LineComment(this.ast); } else { comment = new BlockComment(this.ast); } } else if (positions[0]>0) { // Block comment have positive start position comment = new BlockComment(this.ast); } else { // Line comment have negative start and end position start = -start; comment = new LineComment(this.ast); } comment.setSourceRange(start, end - start); } return comment; }
protected Comment createComment(int[] positions) { // Create comment node Comment comment = null; int start = positions[0]; int end = positions[1]; if (positions[1]>0) { // Javadoc comments have positive end position Javadoc docComment = this.docParser.parse(positions); if (docComment == null) return null; comment = docComment; } else { end = -end; if (positions[0] == 0) { // we cannot know without testing chars again if (this.docParser.scanner.source[1] == '/') { comment = new LineComment(this.ast); } else { comment = new BlockComment(this.ast); } } else if (positions[0]>0) { // Block comment have positive start position comment = new BlockComment(this.ast); } else { // Line comment have negative start and end position start = -start; comment = new LineComment(this.ast); } comment.setSourceRange(start, end - start); } return comment; }
protected Comment createComment(int[] positions) { // Create comment node Comment comment = null; int start = positions[0]; int end = positions[1]; if (positions[1]>0) { // Javadoc comments have positive end position Javadoc docComment = this.docParser.parse(positions); if (docComment == null) return null; comment = docComment; } else { end = -end; if (positions[0] == 0) { // we cannot know without testing chars again if (this.docParser.scanner.source[1] == '/') { comment = new LineComment(this.ast); } else { comment = new BlockComment(this.ast); } } else if (positions[0]>0) { // Block comment have positive start position comment = new BlockComment(this.ast); } else { // Line comment have negative start and end position start = -start; comment = new LineComment(this.ast); } comment.setSourceRange(start, end - start); } return comment; }
protected Comment createComment(int[] positions) { // Create comment node Comment comment = null; int start = positions[0]; int end = positions[1]; if (positions[1]>0) { // Javadoc comments have positive end position Javadoc docComment = this.docParser.parse(positions); if (docComment == null) return null; comment = docComment; } else { end = -end; if (positions[0] == 0) { // we cannot know without testing chars again if (this.docParser.scanner.source[1] == '/') { comment = new LineComment(this.ast); } else { comment = new BlockComment(this.ast); } } else if (positions[0]>0) { // Block comment have positive start position comment = new BlockComment(this.ast); } else { // Line comment have negative start and end position start = -start; comment = new LineComment(this.ast); } comment.setSourceRange(start, end - start); } return comment; }
protected Comment createComment(int[] positions) { // Create comment node Comment comment = null; int start = positions[0]; int end = positions[1]; if (positions[1]>0) { // Javadoc comments have positive end position Javadoc docComment = this.docParser.parse(positions); if (docComment == null) return null; comment = docComment; } else { end = -end; if (positions[0] == 0) { // we cannot know without testing chars again if (this.docParser.scanner.source[1] == '/') { comment = new LineComment(this.ast); } else { comment = new BlockComment(this.ast); } } else if (positions[0]>0) { // Block comment have positive start position comment = new BlockComment(this.ast); } else { // Line comment have negative start and end position start = -start; comment = new LineComment(this.ast); } comment.setSourceRange(start, end - start); } return comment; }