Hi,
If I understand correctly, you are trying to visualise a graph as a tree where you can expand each node like Eclipse allows it in its call graph viewer. We do not provide such feature yet, but you can write a query to visualise as a graph the calls between the packages you are interested in. Here is how I would do it:
class ArboSourcePackage extends Package {
ArboSourcePackage() {
this.fromSource() and
this.getName().matches("arbo%")
}
ArboSourcePackage getACallee() {
exists(Call c |
c.getCaller().getDeclaringType().getPackage() = this and
c.getCallee().getDeclaringType().getPackage() = result)
}
}
from ArboSourcePackage root, ArboSourcePackage p
where root.getName().matches("arbo.root")
and root.getACallee*() = p
select p, p.getACallee()
I first define a new class for any source package whose name starts with "arbo". I also define there a method that yields any other "arbo" source package that is called from this package.
Then I write a query that finds the "arbo.root" package, and any
"arbo" source package p that is transitively called from the root. I select each p
with its direct callees to obtain a binary relation that can be depicted as a graph.
Hope it helps,
mathieu