String (@NotNull String homePath) { boolean isRunningFromSources = Files.isDirectory(Paths.get(homePath, ".idea")); if (!isRunningFromSources) return homePath; if (Files.isDirectory(Paths.get(homePath, "community/.idea"))) { return homePath + "/community"; } if (Files.isDirectory(Paths.get(homePath, "ultimate/community/.idea"))) { return homePath + "/ultimate/community"; } if (Files.isDirectory(Paths.get(homePath, "../../../community/.idea"))) { // support projects in ULTIMATE_REPO/remote-dev/extras/SUBDIR return homePath + "/../../../community"; } if (Files.isRegularFile(Paths.get(homePath, "../../.dotnet-products.root.marker"))) { return homePath + "/../ultimate/community"; } return homePath; }