void (PsiJavaModule module, Set<PsiJavaModule> dependencies) { for (Iterator<PsiJavaModule> iterator = myGraph.getIn(module); iterator.hasNext();) { PsiJavaModule dependency = iterator.next(); if (!dependencies.contains(dependency)) { dependencies.add(dependency); collectDependencies(dependency, dependencies); } } }