mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-CR-63906 prefer findFileByNioFile, remove not applicable @SystemDependent annotation
GitOrigin-RevId: e7891758bd35a5733099500c3371f04a92b4f986
This commit is contained in:
committed by
intellij-monorepo-bot
parent
433dbb4c66
commit
d8ed48d6c5
@@ -145,18 +145,18 @@ public class JsonSchemaInfo {
|
||||
return text;
|
||||
}
|
||||
|
||||
Path ioFile = Paths.get(text);
|
||||
if (!ioFile.isAbsolute()) {
|
||||
Path file = Paths.get(text);
|
||||
if (!file.isAbsolute()) {
|
||||
return text;
|
||||
}
|
||||
|
||||
String relativePath = FileUtil.getRelativePath(FileUtil.toSystemIndependentName(ioFile.toString()), project.getBasePath(), '/');
|
||||
String relativePath = FileUtil.getRelativePath(FileUtil.toSystemIndependentName(file.toString()), project.getBasePath(), '/');
|
||||
if (relativePath != null) {
|
||||
return relativePath;
|
||||
}
|
||||
|
||||
VirtualFile file = LocalFileSystem.getInstance().findFileByNioFile(ioFile);
|
||||
if (file == null) {
|
||||
VirtualFile virtualFile = LocalFileSystem.getInstance().findFileByNioFile(file);
|
||||
if (virtualFile == null) {
|
||||
return text;
|
||||
}
|
||||
|
||||
@@ -165,8 +165,8 @@ public class JsonSchemaInfo {
|
||||
return text;
|
||||
}
|
||||
|
||||
if (isMeaningfulAncestor(VfsUtilCore.getCommonAncestor(file, projectBaseDir))) {
|
||||
String path = VfsUtilCore.findRelativePath(projectBaseDir, file, File.separatorChar);
|
||||
if (isMeaningfulAncestor(VfsUtilCore.getCommonAncestor(virtualFile, projectBaseDir))) {
|
||||
String path = VfsUtilCore.findRelativePath(projectBaseDir, virtualFile, File.separatorChar);
|
||||
if (path != null) {
|
||||
return path;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user