How to get all dependencies from a compilation unit? [message #250711] |
Thu, 17 January 2008 18:06  |
Eclipse User |
|
|
|
Originally posted by: cassio.ufpe.gmail.com
Hello everyone,
Is there any straightfoward way to get all dependencies or all types
depedents of a compilation unit? Do I really have to scan the code using
the ASTVisitor and retrieve each dependence one by one?
The .getAllTypes() method returns only the types declared in the
compilation unit, not its dependencies...
I'm trying to capture classes relationships (imports, method calls, etc)
in order to create a graph of dependencies among classes. By doing so, I
will be able to apply some clustering algorithms in those graphs to
identify possible reusable modules.
Thanks!!
Cassio
|
|
|
|
|
Re: How to get all dependencies from a compilation unit? [message #250904 is a reply to message #250711] |
Wed, 23 January 2008 17:16  |
Eclipse User |
|
|
|
Cassio Melo wrote:
> Hello everyone,
>
> Is there any straightfoward way to get all dependencies or all types
> depedents of a compilation unit? Do I really have to scan the code using
> the ASTVisitor and retrieve each dependence one by one?
>
> The .getAllTypes() method returns only the types declared in the
> compilation unit, not its dependencies...
>
> I'm trying to capture classes relationships (imports, method calls, etc)
> in order to create a graph of dependencies among classes. By doing so, I
> will be able to apply some clustering algorithms in those graphs to
> identify possible reusable modules.
>
> Thanks!!
> Cassio
>
My advice would be to use SearchEngine.searchDeclarationsOfReferencedTypes
|
|
|
Powered by
FUDForum. Page generated in 0.02632 seconds