Java 类com.intellij.openapi.vfs.newvfs.RefreshSession 实例源码

项目:consulo    文件:SaveAndSyncHandlerImpl.java   
public void maybeRefresh(@Nonnull ModalityState modalityState) {
  if (myBlockSyncOnFrameActivationCount.get() == 0 && mySettings.isSyncOnFrameActivation()) {
    RefreshQueue queue = RefreshQueue.getInstance();
    queue.cancelSession(myRefreshSessionId);

    RefreshSession session = queue.createSession(true, true, null, modalityState);
    session.addAllFiles(ManagingFS.getInstance().getLocalRoots());
    myRefreshSessionId = session.getId();
    session.launch();
    LOG.debug("vfs refreshed");
  }
  else if (LOG.isDebugEnabled()) {
    LOG.debug("vfs refresh rejected, blocked: " + (myBlockSyncOnFrameActivationCount.get() != 0)
              + ", isSyncOnFrameActivation: " + mySettings.isSyncOnFrameActivation());
  }
}
项目:intellij-ce-playground    文件:PlatformVirtualFileManager.java   
@Override
protected long doRefresh(boolean asynchronous, @Nullable Runnable postAction) {
  if (!asynchronous) {
    ApplicationManager.getApplication().assertIsDispatchThread();
  }

  // todo: get an idea how to deliver changes from local FS to jar fs before they go refresh
  RefreshSession session = RefreshQueue.getInstance().createSession(asynchronous, true, postAction);
  session.addAllFiles(myManagingFS.getRoots());
  session.launch();

  super.doRefresh(asynchronous, postAction);

  return session.getId();
}
项目:intellij-ce-playground    文件:SaveAndSyncHandlerImpl.java   
public void maybeRefresh(@NotNull ModalityState modalityState) {
  if (myBlockSyncOnFrameActivationCount.get() == 0 && mySettings.isSyncOnFrameActivation()) {
    RefreshQueue queue = RefreshQueue.getInstance();
    queue.cancelSession(myRefreshSessionId);

    RefreshSession session = queue.createSession(true, true, null, modalityState);
    session.addAllFiles(ManagingFS.getInstance().getLocalRoots());
    myRefreshSessionId = session.getId();
    session.launch();
  }
}
项目:tools-idea    文件:PlatformVirtualFileManager.java   
@Override
protected long doRefresh(boolean asynchronous, @Nullable Runnable postAction) {
  if (!asynchronous) {
    ApplicationManager.getApplication().assertIsDispatchThread();
  }

  // todo: get an idea how to deliver changes from local FS to jar fs before they go refresh
  RefreshSession session = RefreshQueue.getInstance().createSession(asynchronous, true, postAction);
  session.addAllFiles(myManagingFS.getRoots());
  session.launch();

  super.doRefresh(asynchronous, postAction);

  return session.getId();
}
项目:tools-idea    文件:SaveAndSyncHandlerImpl.java   
public void maybeRefresh(@NotNull ModalityState modalityState) {
  if (myBlockSyncOnFrameActivationCount.get() == 0) {
    LOG.debug("VFS refresh started");

    RefreshQueue queue = RefreshQueue.getInstance();
    queue.cancelSession(myRefreshSessionId);

    RefreshSession session = queue.createSession(true, true, null, modalityState);
    session.addAllFiles(ManagingFS.getInstance().getLocalRoots());
    myRefreshSessionId = session.getId();
    session.launch();

    LOG.debug("VFS refresh finished");
  }
}
项目:consulo    文件:PlatformVirtualFileManager.java   
@Override
protected long doRefresh(boolean asynchronous, @Nullable Runnable postAction) {
  if (!asynchronous) {
    ApplicationManager.getApplication().assertIsDispatchThread();
  }

  // todo: get an idea how to deliver changes from local FS to jar fs before they go refresh
  RefreshSession session = RefreshQueue.getInstance().createSession(asynchronous, true, postAction);
  session.addAllFiles(myManagingFS.getRoots());
  session.launch();

  super.doRefresh(asynchronous, postAction);

  return session.getId();
}
项目:consulo    文件:CompilerServerRefreshQueueImpl.java   
@Override
public RefreshSession createSession(boolean async, boolean recursive, @Nullable Runnable finishRunnable, @Nonnull ModalityState state) {
  return new CompilerServerRefreshSessionImpl();
}