Пример #1
0
 public void invokeRefreshSvnRoots(final boolean asynchronous) {
   REFRESH_LOG.debug("refresh: ", new Throwable());
   if (myCopiesRefreshManager != null) {
     if (asynchronous) {
       myCopiesRefreshManager.getCopiesRefresh().asynchRequest();
     } else {
       if (ApplicationManager.getApplication().isDispatchThread()) {
         ProgressManager.getInstance()
             .runProcessWithProgressSynchronously(
                 new Runnable() {
                   @Override
                   public void run() {
                     myCopiesRefreshManager.getCopiesRefresh().synchRequest();
                   }
                 },
                 SvnBundle.message("refreshing.working.copies.roots.progress.text"),
                 true,
                 myProject);
       } else {
         myCopiesRefreshManager.getCopiesRefresh().synchRequest();
       }
     }
   }
 }
Пример #2
0
  private void cleanup17copies() {
    final Runnable callCleanupWorker =
        new Runnable() {
          public void run() {
            new CleanupWorker(
                new VirtualFile[] {}, myProject, "action.Subversion.cleanup.progress.title") {
              @Override
              protected void chanceToFillRoots() {
                final List<WCInfo> infos = getAllWcInfos();
                final LocalFileSystem lfs = LocalFileSystem.getInstance();
                final List<VirtualFile> roots = new ArrayList<VirtualFile>(infos.size());
                for (WCInfo info : infos) {
                  if (WorkingCopyFormat.ONE_DOT_SEVEN.equals(info.getFormat())) {
                    final VirtualFile file =
                        lfs.refreshAndFindFileByIoFile(new File(info.getPath()));
                    if (file == null) {
                      LOG.info("Wasn't able to find virtual file for wc root: " + info.getPath());
                    } else {
                      roots.add(file);
                    }
                  }
                }
                myRoots = roots.toArray(new VirtualFile[roots.size()]);
              }
            }.execute();
          }
        };

    myCopiesRefreshManager.waitRefresh(
        new Runnable() {
          @Override
          public void run() {
            ApplicationManager.getApplication().invokeLater(callCleanupWorker, ModalityState.any());
          }
        });
  }
Пример #3
0
 public void invokeRefreshSvnRoots() {
   REFRESH_LOG.debug("refresh: ", new Throwable());
   if (myCopiesRefreshManager != null) {
     myCopiesRefreshManager.asynchRequest();
   }
 }