I am trying to get hold of all packages that are referenced from a module
and its dependencies.
So I get hold of GlobalSearchScopes ?
Module depModules = rootModel.getModuleDependencies();
for( Module depModule : depModules )
GlobalSearchScope scope = depModule.getModuleScope();
I can then ask for all the classes in these scopes
PsiManager psiManager = PsiManager.getInstance( m_project );
PsiSearchHelper searchHelper = psiManager.getSearchHelper();
PsiClass psiClasses = searchHelper.findAllClasses( scope );
But PsiClass doesn't have a getPackage() method (strange!), and I doubt I
should extract the name manually, since I am then outside the Psi tree...
Also, this won't work if a package doesn't have classes in it. So, I am
pretty convinced that I should not bother with the classes at all, but then