mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
don't resolve from android classes to android source (IDEA-141587)
This commit is contained in:
+2
-24
@@ -22,12 +22,9 @@ package com.intellij.psi.impl.search;
|
||||
import com.intellij.ide.highlighter.JavaClassFileType;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.roots.JdkOrderEntry;
|
||||
import com.intellij.openapi.roots.OrderEntry;
|
||||
import com.intellij.openapi.roots.ProjectFileIndex;
|
||||
import com.intellij.openapi.roots.ProjectRootManager;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.psi.SdkResolveScopeProvider;
|
||||
import com.intellij.psi.search.DelegatingGlobalSearchScope;
|
||||
import com.intellij.psi.search.GlobalSearchScope;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -66,27 +63,8 @@ public class JavaSourceFilterScope extends DelegatingGlobalSearchScope {
|
||||
return myIndex.isInLibraryClasses(file);
|
||||
}
|
||||
|
||||
if (myIndex.isInSourceContent(file)) {
|
||||
return true;
|
||||
}
|
||||
final Project project = getProject();
|
||||
|
||||
if (project != null) {
|
||||
for (OrderEntry entry : myIndex.getOrderEntriesForFile(file)) {
|
||||
if (entry instanceof JdkOrderEntry) {
|
||||
final JdkOrderEntry jdkOrderEntry = (JdkOrderEntry)entry;
|
||||
|
||||
for (SdkResolveScopeProvider provider : SdkResolveScopeProvider.EP_NAME.getExtensions()) {
|
||||
final GlobalSearchScope scope = provider.getScope(project, jdkOrderEntry);
|
||||
|
||||
if (scope != null && scope.contains(file)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
return myIndex.isInSourceContent(file) ||
|
||||
myBaseScope.isForceSearchingInLibrarySources() && myIndex.isInLibrarySource(file);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user