Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jdt-core-dev] Parsing comments via JDT AST

See CompilationUnit.getCommentList() for details on how to access non-doc 
comments in JDT ASTs.

jdt-core-dev-admin@xxxxxxxxxxx wrote on 10/08/2004 09:48:49 PM:

> Hi All,
>    I apologize ahead of time if I've posted to the
> wrong list, but I'm not sure the folks on the user
> lists will be able to answer my finicky question(s).
> 
> The questions are
> 
> 1) Is there a way to enable parsing of *all* comments,
> not just those in front of TypeDeclarations, and
> MethodDeclarations? I currently have the
> JavaCore.COMPILER_DOC_COMMENT_SUPPORT set to
> JavaCore.ENABLED, and yet the parser seems to drop
> comments within methods. (The parser "kind" is set to
> K_COMPILATION_UNIT)
> 
> 2) Is there a way to get the parser to parse
> LINE_COMMENTs as in "//" and BLOCK_COMMENTs as in "/*
> .. */"? Although I see the constant definitions on the
> ASTNode class, I never see BlockComment/LineComment(s)
> in my ASTs. Any clues as to what I could be doing
> wrong?
> 
> Thanks,
> Denis
> 
> 
> 
> _______________________________
> Do you Yahoo!?
> Declare Yourself - Register online to vote today!
> http://vote.yahoo.com
> _______________________________________________
> jdt-core-dev mailing list
> jdt-core-dev@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/jdt-core-dev



Back to the top