private void addToDirtyFiles(@NotNull VirtualFile fileOrDir) {
    if (!(fileOrDir instanceof VirtualFileWithId fileOrDirWithId)) return;
    int id = fileOrDirWithId.getId();
    List<Project> projects = myFileBasedIndex.getIndexableFilesFilterHolder().findProjectsForFile(FileBasedIndex.getFileId(fileOrDir));
    myDirtyFiles.addFile(projects, id);
  }
private void addToDirtyFiles(@NotNull VirtualFile fileOrDir)