inheritance transitivity with several versions of same library in classpath (IDEA...
[idea/community.git] / platform / projectModel-impl / src / com / intellij / openapi / roots / impl / ProjectFileIndexFacade.java
index 476fc854f8629c185de3163ec6776cc209643206..0e4aa7dc83ffab00933a99e28185bbcbe22e118e 100644 (file)
@@ -19,9 +19,11 @@ package com.intellij.openapi.roots.impl;
 import com.intellij.openapi.module.Module;
 import com.intellij.openapi.project.Project;
 import com.intellij.openapi.roots.FileIndexFacade;
+import com.intellij.openapi.roots.JdkOrderEntry;
 import com.intellij.openapi.roots.ProjectFileIndex;
 import com.intellij.openapi.roots.ProjectRootManager;
 import com.intellij.openapi.vfs.VirtualFile;
+import com.intellij.util.containers.ContainerUtil;
 import org.jetbrains.annotations.Nullable;
 
 /**
@@ -57,6 +59,11 @@ public class ProjectFileIndexFacade extends FileIndexFacade {
   }
 
   @Override
+  public boolean isInSdkClasses(VirtualFile file) {
+    return ContainerUtil.findInstance(myFileIndex.getOrderEntriesForFile(file), JdkOrderEntry.class) != null;
+  }
+
+  @Override
   public boolean isInLibrarySource(VirtualFile file) {
     return myFileIndex.isInLibrarySource(file);
   }