@Override
  public void endTransaction() {
    if (!myTransactionStarted) return;
    myTransactionStarted = false;
    super.endTransaction();
    Set<VirtualFile> map = filesToScan;
    if (!map.isEmpty()) map.clear();
    filesToScan = filesToScan2;
    filesToScan2 = map;
  }
@Override
  public void endTransaction()