mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[python] get rid of usage of DirectoryIndex class (IDEA-276394)
This class is going to be deprecated. GitOrigin-RevId: 22c6e53b26ff795bf4834116afcbc7a049fb90ef
This commit is contained in:
committed by
intellij-monorepo-bot
parent
1bdc070fa5
commit
175e3373f9
+1
-4
@@ -18,8 +18,6 @@ import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.project.ProjectManager;
|
||||
import com.intellij.openapi.projectRoots.Sdk;
|
||||
import com.intellij.openapi.roots.*;
|
||||
import com.intellij.openapi.roots.impl.DirectoryIndex;
|
||||
import com.intellij.openapi.roots.impl.DirectoryInfo;
|
||||
import com.intellij.openapi.roots.impl.FilePropertyPusher;
|
||||
import com.intellij.openapi.roots.impl.PushedFilePropertiesUpdater;
|
||||
import com.intellij.openapi.util.Key;
|
||||
@@ -341,8 +339,7 @@ public final class PythonLanguageLevelPusher implements FilePropertyPusher<Langu
|
||||
if (myIterateAsContent) {
|
||||
ModuleFileIndex index = ReadAction.compute(() -> {
|
||||
if (myProject.isDisposed() || !myRoot.isValid()) return null;
|
||||
DirectoryInfo info = DirectoryIndex.getInstance(myProject).getInfoForFile(myRoot);
|
||||
Module module = info.getModule();
|
||||
Module module = ProjectFileIndex.getInstance(myProject).getModuleForFile(myRoot, false);
|
||||
if (module == null) return null;
|
||||
return ModuleRootManager.getInstance(module).getFileIndex();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user