@Override
  public void visit(@NotNull RenameChange c) throws StopVisitingException {
    if (shouldRevert(c)) {
      VirtualFile f = myGateway.findVirtualFile(c.getPath());
      if (f != null) {
        VirtualFile existing = f.getParent().findChild(c.getOldName());
        try {
          if (existing != null && !Comparing.equal(existing, f)) {
            existing.delete(LocalHistory.VFS_EVENT_REQUESTOR);
          }
          f.rename(LocalHistory.VFS_EVENT_REQUESTOR, c.getOldName());
        }
        catch (IOException e) {
          throw new RuntimeIOException(e);
        }
      }
    }
    checkShouldStop(c);
  }
@Override
  public void visit(@NotNull RenameChange c)