Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jdt-core-dev] AST of a full java project

Please use the eclipse.tools.jdt newsgroup for this kind of question. This
list is usually reserved to JDT/Core developers information exchange,
thanks :-)

That said, you can find an example of similar need in our performance tests
project 'org.eclipse.jdt.core.tests.performance'.
Open FullSourceWorkspaceASTTests class and have a look at test
'testDomAstCreationProjectJLS3()';
it's calling the method runASTCreation(IJavaProject) which should nicely
match your requirement.

HTH

Cordialement/Regards,

Frédéric




                                                                       
             "Cassio Melo"                                             
             <cassio.ufpe@gmai                                         
             l.com>                                                     To
             Sent by:                  jdt-core-dev@xxxxxxxxxxx        
             jdt-core-dev-boun                                          cc
             ces@xxxxxxxxxxx                                           
                                                                   Subject
                                       [jdt-core-dev] AST of a full java
             01/11/2008 04:02          project                         
             PM                                                        
                                                                       
                                                                       
             Please respond to                                         
             "Eclipse JDT Core                                         
             developers list."                                         
             <jdt-core-dev@ecl                                         
                 ipse.org>                                             
                                                                       
                                                                       




Hi there,

I'm trying to get the AST of a full java project (in fact, it would be
better if I could get the AST from a set of java files, but it doesn't seem
to be possible). I'm a bit confused about how can I setSource of the
ASTParse in these cases or at least how can I get the CompilationUnit so
that I can perform the parse.

...
IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
IProject project = root.getProject("ProjectX");
IJavaProject javaProject = JavaCore.create(project);

// ??

I'm newbie in Eclipse JDT, so please forgive me if it seems a dumb question
=P
Thanks a lot!

Cassio
--
Cassio Melo
www.cin.ufpe.br/~cam2/info
+55 (81) 9134 1950 _______________________________________________
jdt-core-dev mailing list
jdt-core-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jdt-core-dev




Back to the top