Java 类org.eclipse.jdt.core.dom.LineComment 实例源码

项目:pandionj    文件:TagParser.java   
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;
}
项目:clocom    文件:CommentVisitor.java   
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;
    }
项目:j2d    文件:J2dVisitor.java   
@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;
}
项目:pandionj    文件:Visitor.java   
@Override
public boolean visit(LineComment node) {
    int lineNumber = ((CompilationUnit)node.getRoot()).getLineNumber(node.getStartPosition());
    System.out.println(lineNumber + ":" + node);
    return super.visit(node);
}
项目:evosuite    文件:LoggingVisitor.java   
/** {@inheritDoc} */
@Override
public void endVisit(LineComment node) {
    logger.warn("Method endVisitLineComment for " + node + " for " + node + " not implemented!");
    super.endVisit(node);
}
项目:evosuite    文件:LoggingVisitor.java   
/** {@inheritDoc} */
@Override
public boolean visit(LineComment node) {
    logger.warn("Method visitLineComment for " + node + " not implemented!");
    return super.visit(node);
}
项目:eip-designer    文件:CamelJavaFileParser.java   
@Override
public boolean visit(LineComment node) {
   commentMap.put(routeCU.getLineNumber(node.getStartPosition()), getCommentContent(node));
   return true;
}
项目:Beagle    文件:NotRecursingAstVisitor.java   
@Override
public boolean visit(final LineComment node) {
    return false;
}
项目:Beagle    文件:InstrumentableAstNodeLister.java   
@Override
public boolean visit(final LineComment node) {
    // not instrumentable, contains no instrumentable nodes
    return false;
}
项目:Eclipse-Postfix-Code-Completion    文件:AstMatchingNodeFinder.java   
@Override
public boolean visit(LineComment node) {
    if (node.subtreeMatch(fMatcher, fNodeToMatch))
        return matches(node);
    return super.visit(node);
}
项目:Eclipse-Postfix-Code-Completion    文件:GenericVisitor.java   
@Override
public void endVisit(LineComment node) {
    endVisitNode(node);
}
项目:Eclipse-Postfix-Code-Completion    文件:GenericVisitor.java   
@Override
public boolean visit(LineComment node) {
    return visitNode(node);
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:AstMatchingNodeFinder.java   
@Override
public boolean visit(LineComment node) {
    if (node.subtreeMatch(fMatcher, fNodeToMatch))
        return matches(node);
    return super.visit(node);
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:HierarchicalASTVisitor.java   
@Override
public boolean visit(LineComment node) {
    return visit((Comment)node);
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:HierarchicalASTVisitor.java   
@Override
public void endVisit(LineComment node) {
    endVisit((Comment)node);
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:ASTFlattener.java   
@Override
public boolean visit(LineComment node) {
    this.fBuffer.append("//\n");//$NON-NLS-1$
    return false;
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:GenericVisitor.java   
@Override
public boolean visit(LineComment node) {
    return visitNode(node);
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:GenericVisitor.java   
@Override
public void endVisit(LineComment node) {
    endVisitNode(node);
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:NaiveASTFlattener.java   
public boolean visit(LineComment node) {
    this.buffer.append("//\n");//$NON-NLS-1$
    return false;
}
项目:eclipse-i18ntools    文件:ASTNodeFinder.java   
@Override
public boolean visit(final LineComment node) {
    return this.internalVisit(node);
}