mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
unify project opening - IPR project must be opened in the same way as directory based (part 2)
GitOrigin-RevId: 2c1c6ba19714509e1d6764a59ef14ba13b37d4f3
This commit is contained in:
committed by
intellij-monorepo-bot
parent
5acd6d979c
commit
9a9f7e1dee
@@ -430,7 +430,7 @@ public class RecentProjectsManagerBase extends RecentProjectsManager implements
|
||||
return existing;
|
||||
}
|
||||
|
||||
if (Files.isDirectory(projectFile.resolve(Project.DIRECTORY_STORE_FOLDER))) {
|
||||
if (ProjectUtil.isValidProjectPath(projectFile)) {
|
||||
return PlatformProjectOpenProcessor.openExistingProject(projectFile, projectFile, openProjectOptions, null);
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -134,10 +134,7 @@ public class ProjectUtil {
|
||||
}
|
||||
}
|
||||
|
||||
if (Files.isDirectory(file.resolve(Project.DIRECTORY_STORE_FOLDER))) {
|
||||
return PlatformProjectOpenProcessor.openExistingProject(file, file, options, null);
|
||||
}
|
||||
else if (StringUtil.endsWith(file.toString(), ProjectFileType.DOT_DEFAULT_EXTENSION) && Files.isRegularFile(file)) {
|
||||
if (isValidProjectPath(file)) {
|
||||
return PlatformProjectOpenProcessor.openExistingProject(file, file, options, null);
|
||||
}
|
||||
|
||||
@@ -402,4 +399,9 @@ public class ProjectUtil {
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public static boolean isValidProjectPath(@NotNull Path file) {
|
||||
return Files.isDirectory(file.resolve(Project.DIRECTORY_STORE_FOLDER)) ||
|
||||
(StringUtil.endsWith(file.toString(), ProjectFileType.DOT_DEFAULT_EXTENSION) && Files.isRegularFile(file));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user