/*
  * Recursively check for and handle orphaned CVS folders
  */
 private void handleOrphanedSubtree(final ICVSFolder folder) throws CVSException {
   if (folder.getIResource().getType() == IResource.PROJECT) return;
   if (CVSWorkspaceRoot.isOrphanedSubtree((IContainer) folder.getIResource())) {
     try {
       run(
           new IRunnableWithProgress() {
             public void run(IProgressMonitor monitor)
                 throws InvocationTargetException, InterruptedException {
               try {
                 folder.unmanage(null);
               } catch (CVSException e) {
                 CVSProviderPlugin.log(e);
               }
             }
           },
           true,
           PROGRESS_BUSYCURSOR);
     } catch (InvocationTargetException e) {
       // Ignore this since we logged the one we care about above
     } catch (InterruptedException e) {
       throw new OperationCanceledException();
     }
   }
   handleOrphanedSubtree(folder.getParent());
 }
示例#2
0
 private ICVSRepositoryLocation internalGetRepositoryLocationFor(ICVSResource resource)
     throws CVSException {
   ICVSFolder folder;
   if (resource.isFolder()) {
     folder = (ICVSFolder) resource;
   } else {
     folder = resource.getParent();
   }
   if (folder.isCVSFolder()) {
     ICVSRepositoryLocation location =
         KnownRepositories.getInstance().getRepository(folder.getFolderSyncInfo().getRoot());
     return location;
   }
   // XXX This is asking for trouble
   return null;
 }