public boolean visit(LineComment node) { int start = node.getStartPosition(); int line = cunit.getLineNumber(start); String comment = parser.getSourceFragment(start, node.getLength()); comment = comment.substring(comment.indexOf('/')+2).trim(); String[] tags = comment.split("\\s+"); for (VariableTags t : variables) { if(t.declarationLine == line) for(String tag : tags) if(validTags.contains(tag)) t.addTag(tag); } return true; }
public boolean visit(LineComment node) { int startLineNumber = compilationUnit.getLineNumber(node.getStartPosition()); int endLineNumber = compilationUnit.getLineNumber(node.getStartPosition() + node.getLength()); if (startLineNumber >= startLine && endLineNumber <= endLine) { // Build the comment char by char StringBuilder comment = new StringBuilder(); for (int i = node.getStartPosition(); i < node.getStartPosition() + node.getLength(); i++) { comment.append(source[i]); } if (comment.capacity() > 0) { String str = comment.toString(); if (str != null) { CommentMap cMap = new CommentMap(str, startLineNumber, endLineNumber, 1); cMapList.add(cMap); } } } return true; }
@Override public boolean visit(LineComment node) { //System.out.println("Found: " + node.getClass()); /* TODO comments in the form: something(); // foo are put in the incorrect place. */ String comment = new String(Arrays.copyOfRange(sourceCode, node.getStartPosition(), node.getStartPosition() + node.getLength())); println(comment); return false; }
@Override public boolean visit(LineComment node) { int lineNumber = ((CompilationUnit)node.getRoot()).getLineNumber(node.getStartPosition()); System.out.println(lineNumber + ":" + node); return super.visit(node); }
/** {@inheritDoc} */ @Override public void endVisit(LineComment node) { logger.warn("Method endVisitLineComment for " + node + " for " + node + " not implemented!"); super.endVisit(node); }
/** {@inheritDoc} */ @Override public boolean visit(LineComment node) { logger.warn("Method visitLineComment for " + node + " not implemented!"); return super.visit(node); }
@Override public boolean visit(LineComment node) { commentMap.put(routeCU.getLineNumber(node.getStartPosition()), getCommentContent(node)); return true; }
@Override public boolean visit(final LineComment node) { return false; }
@Override public boolean visit(final LineComment node) { // not instrumentable, contains no instrumentable nodes return false; }
@Override public boolean visit(LineComment node) { if (node.subtreeMatch(fMatcher, fNodeToMatch)) return matches(node); return super.visit(node); }
@Override public void endVisit(LineComment node) { endVisitNode(node); }
@Override public boolean visit(LineComment node) { return visitNode(node); }
@Override public boolean visit(LineComment node) { return visit((Comment)node); }
@Override public void endVisit(LineComment node) { endVisit((Comment)node); }
@Override public boolean visit(LineComment node) { this.fBuffer.append("//\n");//$NON-NLS-1$ return false; }
public boolean visit(LineComment node) { this.buffer.append("//\n");//$NON-NLS-1$ return false; }
@Override public boolean visit(final LineComment node) { return this.internalVisit(node); }