use of com.intellij.remoteServer.util.CloudGitDeploymentDetector in project intellij-community by JetBrains.
the class CloudGitProjectStructureDetector method detectApplicationRoot.
private static void detectApplicationRoot(@NotNull File dir, @NotNull List<DetectedProjectRoot> result) {
VirtualFile repositoryRoot = LocalFileSystem.getInstance().refreshAndFindFileByIoFile(dir);
if (repositoryRoot == null) {
return;
}
if (GitUtil.findGitDir(repositoryRoot) == null) {
return;
}
Project project = ProjectManager.getInstance().getDefaultProject();
GitRepository repository = GitRepositoryImpl.getInstance(repositoryRoot, project, false);
for (CloudGitDeploymentDetector deploymentDetector : CloudGitDeploymentDetector.EP_NAME.getExtensions()) {
String applicationName = deploymentDetector.getFirstApplicationName(repository);
if (applicationName != null) {
result.add(new CloudGitProjectRoot(deploymentDetector, dir, repositoryRoot, applicationName));
}
}
}
Aggregations