String (@NotNull Project project, @NotNull String targetProjectPath, @Nullable String rootProjectPath) { GradleProjectSettings projectSettings = GradleSettings.getInstance(project).getLinkedProjectSettings(targetProjectPath); if (projectSettings != null && projectSettings.getCompositeBuild() != null) { for (BuildParticipant buildParticipant : projectSettings.getCompositeBuild().getCompositeParticipants()) { if (buildParticipant.getProjects().contains(targetProjectPath)) { return ExternalSystemApiUtil.getProjectRepresentationName(targetProjectPath, buildParticipant.getRootPath()); } } } return ExternalSystemApiUtil.getProjectRepresentationName(targetProjectPath, rootProjectPath); }