public void detectAndEnable() {
    Collection<VcsRoot> roots = myTargetDirectory != null
                                ? VcsRootDetector.getInstance(myProject).detect(myTargetDirectory)
                                : VcsRootDetector.getInstance(myProject).detect();
    enable(roots);
  }
public void detectAndEnable()