From 8e11281d4d56141f7b3a1ce0c60f10a692a2106a Mon Sep 17 00:00:00 2001 From: peter Date: Thu, 7 Nov 2013 21:47:34 +0100 Subject: [PATCH] don't walk module src roots in search for .class file source (IDEA-116085) --- .../intellij/psi/impl/JavaPsiImplementationHelperImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/java/java-impl/src/com/intellij/psi/impl/JavaPsiImplementationHelperImpl.java b/java/java-impl/src/com/intellij/psi/impl/JavaPsiImplementationHelperImpl.java index 28c5c702c42b..ab6289584719 100644 --- a/java/java-impl/src/com/intellij/psi/impl/JavaPsiImplementationHelperImpl.java +++ b/java/java-impl/src/com/intellij/psi/impl/JavaPsiImplementationHelperImpl.java @@ -119,7 +119,9 @@ public class JavaPsiImplementationHelperImpl extends JavaPsiImplementationHelper ProjectFileIndex projectFileIndex = ProjectFileIndex.SERVICE.getInstance(clsFile.getProject()); final Set sourceRoots = ContainerUtil.newLinkedHashSet(); for (OrderEntry orderEntry : projectFileIndex.getOrderEntriesForFile(vFile)) { - Collections.addAll(sourceRoots, orderEntry.getFiles(OrderRootType.SOURCES)); + if (orderEntry instanceof LibraryOrSdkOrderEntry) { + Collections.addAll(sourceRoots, orderEntry.getFiles(OrderRootType.SOURCES)); + } } for (VirtualFile root : sourceRoots) { VirtualFile source = root.findFileByRelativePath(relativeFilePath);