コード例 #1
0
 @Override
 @Nullable
 public VcsDescriptor getDescriptor(final String name) {
   if (name == null) return null;
   if (myProject.isDisposed()) return null;
   return AllVcses.getInstance(myProject).getDescriptor(name);
 }
コード例 #2
0
 @Override
 @Nullable
 public AbstractVcs findVcsByName(String name) {
   if (name == null) return null;
   if (myProject.isDisposed()) return null;
   return AllVcses.getInstance(myProject).getByName(name);
 }
コード例 #3
0
 @Override
 @Nullable
 public AbstractVcs getVcsFor(@NotNull VirtualFile file) {
   final String vcsName = myMappings.getVcsFor(file);
   if (vcsName == null || vcsName.isEmpty()) {
     return null;
   }
   return AllVcses.getInstance(myProject).getByName(vcsName);
 }
コード例 #4
0
 public void unregisterVcs(@NotNull AbstractVcs vcs) {
   if (!ApplicationManager.getApplication().isUnitTestMode()
       && myMappings.haveActiveVcs(vcs.getName())) {
     // unlikely
     LOG.warn(
         "Active vcs '" + vcs.getName() + "' is being unregistered. Remove from mappings first.");
   }
   myMappings.beingUnregistered(vcs.getName());
   AllVcses.getInstance(myProject).unregisterManually(vcs);
 }
コード例 #5
0
 public boolean haveVcses() {
   return !AllVcses.getInstance(myProject).isEmpty();
 }
コード例 #6
0
 @Override
 public VcsDescriptor[] getAllVcss() {
   return AllVcses.getInstance(myProject).getAll();
 }
コード例 #7
0
 public void registerVcs(AbstractVcs vcs) {
   AllVcses.getInstance(myProject).registerManually(vcs);
 }