List of usage examples for org.eclipse.jdt.core.dom LineComment accept
public final void accept(ASTVisitor visitor)
From source file:org.autorefactor.refactoring.rules.CommentsRefactoring.java
License:Open Source License
@Override public boolean visit(CompilationUnit node) { this.astRoot = node; for (Comment comment : getCommentList(astRoot)) { comments.add(Pair.of(new SourceLocation(comment), comment)); }/*from w ww .j a va2 s . c om*/ for (Comment comment : getCommentList(astRoot)) { if (comment.isBlockComment()) { final BlockComment bc = (BlockComment) comment; bc.accept(this); } else if (comment.isLineComment()) { final LineComment lc = (LineComment) comment; lc.accept(this); } else if (comment.isDocComment()) { final Javadoc jc = (Javadoc) comment; jc.accept(this); } else { throw new NotImplementedException(comment); } } return VISIT_SUBTREE; }