mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
OC-2974: More correct definition of what's outside the project (takes certain extension points into an account)
This commit is contained in:
@@ -18,6 +18,7 @@ package com.intellij.psi.search.scope;
|
||||
import com.intellij.openapi.roots.ProjectFileIndex;
|
||||
import com.intellij.openapi.roots.ProjectRootManager;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.psi.search.ProjectScope;
|
||||
import com.intellij.psi.search.scope.packageSet.AbstractPackageSet;
|
||||
import com.intellij.psi.search.scope.packageSet.NamedScope;
|
||||
import com.intellij.psi.search.scope.packageSet.NamedScopesHolder;
|
||||
@@ -37,8 +38,7 @@ public class NonProjectFilesScope extends NamedScope {
|
||||
super(NAME, new AbstractPackageSet("NonProject") {
|
||||
public boolean contains(VirtualFile file, NamedScopesHolder holder) {
|
||||
if (file == null) return true;
|
||||
final ProjectFileIndex fileIndex = ProjectRootManager.getInstance(holder.getProject()).getFileIndex();
|
||||
return !(holder.getProject().isInitialized() && !fileIndex.isIgnored(file) && fileIndex.getContentRootForFile(file) != null);
|
||||
return !ProjectScope.getProjectScope(holder.getProject()).contains(file);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user