mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PsiUtilCore.findFileSystemItem shouldn't fail on files being under ignored directory (EA-134759 - assert: PsiUtilCore.getPsiFile)
This commit is contained in:
@@ -487,7 +487,8 @@ public class PsiUtilCore {
|
||||
public static PsiFileSystemItem findFileSystemItem(@Nullable Project project, @Nullable VirtualFile file) {
|
||||
if (project == null || file == null) return null;
|
||||
if (project.isDisposed() || !file.isValid()) return null;
|
||||
return file.isDirectory() ? PsiManager.getInstance(project).findDirectory(file) : getPsiFile(project, file);
|
||||
PsiManager psiManager = PsiManager.getInstance(project);
|
||||
return file.isDirectory() ? psiManager.findDirectory(file) : psiManager.findFile(file);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user