mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Avoid excluding site-packages if one of the modules uses the base sdk (IDEA-CR-22609)
This commit is contained in:
@@ -62,12 +62,19 @@ public class PyDirectoryIndexExcludePolicy implements DirectoryIndexExcludePolic
|
||||
@NotNull
|
||||
@Override
|
||||
public VirtualFile[] getExcludeRootsForProjectSdk() {
|
||||
List<VirtualFile> result = Lists.newArrayList();
|
||||
Set<VirtualFile> result = Sets.newHashSet();
|
||||
|
||||
Set<VirtualFile> roots = Sets.newHashSet();
|
||||
for (Module m : ModuleManager.getInstance(myProject).getModules()) {
|
||||
Sdk sdk = PythonSdkType.findPythonSdk(m);
|
||||
if (sdk != null) {
|
||||
roots.addAll(Lists.newArrayList(sdk.getRootProvider().getFiles(OrderRootType.CLASSES)));
|
||||
}
|
||||
}
|
||||
|
||||
for (Module m : ModuleManager.getInstance(myProject).getModules()) {
|
||||
Sdk sdk = PythonSdkType.findPythonSdk(m);
|
||||
if (sdk != null) {
|
||||
Set<VirtualFile> roots = Sets.newHashSet(sdk.getRootProvider().getFiles(OrderRootType.CLASSES));
|
||||
for (VirtualFile dir : sdk.getRootProvider().getFiles(OrderRootType.CLASSES)) {
|
||||
for (String name : SITE_PACKAGES) {
|
||||
VirtualFile sitePackages = dir.findChild(name);
|
||||
|
||||
Reference in New Issue
Block a user