void (@NotNull PsiTreeChangeEvent e) { // If local modification PsiFile file = e.getFile(); if (file != null) { scheduleMarkFileAsDirtyAndUpdateTree(file); return; } // If added element if PsiFile and it doesn't contains TODOs, then do nothing PsiElement child = e.getChild(); if (child instanceof PsiFile psiFile) { scheduleMarkFileAsDirtyAndUpdateTree(psiFile); } }