RootIndex correction: compute custom handlers for module to which module dependency belong, not for module which it points to

This commit is contained in:
nik
2015-11-27 13:54:59 +03:00
parent a4ccd3f72e
commit 0f810dc4d6
@@ -239,10 +239,10 @@ public class RootIndex {
Graph graph = new Graph();
MultiMap<VirtualFile, Node> roots = MultiMap.createSmart();
Map<Module, List<OrderEnumerationHandler>> handlersMap = ContainerUtil.newHashMap();
for (final Module module : ModuleManager.getInstance(myProject).getModules()) {
final ModuleRootManager moduleRootManager = ModuleRootManager.getInstance(module);
List<OrderEnumerationHandler> handlers = OrderEnumeratorBase.getCustomHandlers(module);
for (OrderEntry orderEntry : moduleRootManager.getOrderEntries()) {
if (orderEntry instanceof ModuleOrderEntry) {
ModuleOrderEntry moduleOrderEntry = (ModuleOrderEntry)orderEntry;
@@ -265,11 +265,6 @@ public class RootIndex {
roots.putValue(sourceRoot, node);
}
}
List<OrderEnumerationHandler> handlers = handlersMap.get(depModule);
if (handlers == null) {
handlers = OrderEnumeratorBase.getCustomHandlers(depModule);
handlersMap.put(depModule, handlers);
}
boolean shouldRecurse = en.shouldRecurse(moduleOrderEntry, handlers);
node.myEdges.add(new Edge(module, moduleOrderEntry, shouldRecurse));
}