Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jdt-core-dev] use JDT AST in a standalone application?

Hi,
I am building a pattern based Java bug detection tool (like findbugs, pmd, etc.). And I want to use JDT as the front-end to get DOM AST from Java source file. I know
how to do it in the plugin like following:
ASTParser parser = ASTParser.newParser(AST.JLS2);
parser.setSource(file); ASTNode ast= parser.createAST(null);

But I also want my tool to be able to run in the command line
(outside of eclipse). Is there any way to get AST using JDT outside of eclipse?
Thanks a lot!

Happy New Year

William Deng



Back to the top