@Override
    public boolean before(@NotNull VirtualFile file) {
      boolean result = false;
      for (int i = 0; i < myVisitors.size(); i++) {
        int terminatedAt = myTerminatedAtDepth[i];
        if (terminatedAt != 0) continue;

        if (myVisitors.get(i).before(file)) {
          result = true;
        }
        else {
          myTerminatedAtDepth[i] = myDepth;
        }
      }
      if (result) {
        myDepth++;
        return true;
      }
      else {
        for (int i = 0; i < myVisitors.size(); i++) {
          int terminatedAt = myTerminatedAtDepth[i];
          if (terminatedAt == myDepth) {
            myTerminatedAtDepth[i] = 0; // rollback because 'after' won't be called
          }
        }
        return false;
      }
    }
@Override
    public boolean before(@NotNull VirtualFile file)