/** Used to guess VCS for automatic mapping through a look into a working copy */
 @Override
 @Nullable
 public AbstractVcs findVersioningVcs(VirtualFile file) {
   final VcsDescriptor[] vcsDescriptors = getAllVcss();
   VcsDescriptor probableVcs = null;
   for (VcsDescriptor vcsDescriptor : vcsDescriptors) {
     if (vcsDescriptor.probablyUnderVcs(file)) {
       if (probableVcs != null) {
         return null;
       }
       probableVcs = vcsDescriptor;
     }
   }
   return probableVcs == null ? null : findVcsByName(probableVcs.getName());
 }
Пример #2
0
 public static VcsDescriptor createFictive() {
   final VcsDescriptor vcsDescriptor =
       new VcsDescriptor(null, VcsBundle.message("none.vcs.presentation"), null, false);
   vcsDescriptor.myIsNone = true;
   return vcsDescriptor;
 }