private void checkCancelled(NewVirtualFile stopAt) throws RefreshCancelledException {
    Consumer<? super VirtualFile> testListener = ourTestListener;
    if (testListener != null) {
      testListener.accept(stopAt);
    }
    if (myCancelled) {
      if (LOG.isTraceEnabled()) LOG.trace("cancelled at: " + stopAt);
      forceMarkDirty(stopAt);
      synchronized (this) {
        NewVirtualFile file;
        while ((file = myRefreshQueue.poll()) != null) {
          forceMarkDirty(file);
          mySemaphore.up();
        }
      }
      throw new RefreshCancelledException();
    }
  }
private void checkCancelled(NewVirtualFile stopAt)