diff --git a/plugins/git4idea/src/git4idea/roots/GitRootFinder.java b/plugins/git4idea/src/git4idea/roots/GitRootFinder.java deleted file mode 100644 index 01e20992d0f9..000000000000 --- a/plugins/git4idea/src/git4idea/roots/GitRootFinder.java +++ /dev/null @@ -1,46 +0,0 @@ -package git4idea.roots; - -import com.intellij.openapi.project.Project; -import com.intellij.openapi.vcs.VcsDirectoryMapping; -import com.intellij.openapi.vcs.VcsRoot; -import com.intellij.openapi.vcs.VcsRootFinder; -import com.intellij.openapi.vcs.roots.VcsRootDetectInfo; -import com.intellij.openapi.vcs.roots.VcsRootDetector; -import com.intellij.openapi.vfs.VirtualFile; -import com.intellij.util.containers.ContainerUtilRt; -import git4idea.GitVcs; -import org.jetbrains.annotations.NotNull; - -import java.util.Collection; -import java.util.Collections; - -/** - * @author Denis Zhdanov - * @since 7/18/13 6:02 PM - */ -public class GitRootFinder implements VcsRootFinder { - - @NotNull private final Project myProject; - - public GitRootFinder(@NotNull Project project) { - myProject = project; - } - - @NotNull - @Override - public Collection findRoots(@NotNull VirtualFile root) { - VcsRootDetectInfo info = new VcsRootDetector(myProject).detect(root); - Collection roots = info.getRoots(); - if (roots.isEmpty()) { - return Collections.emptyList(); - } - Collection result = ContainerUtilRt.newArrayList(); - for (VcsRoot vcsRoot : roots) { - VirtualFile vFile = vcsRoot.getPath(); - if (vFile != null) { - result.add(new VcsDirectoryMapping(vFile.getPath(), GitVcs.getKey().getName())); - } - } - return result; - } -}