void (@NotNull Project project, @NotNull Disposable disposable, @NotNull Runnable onChange) { MyPsiTreeChangeListener psiListener = new MyPsiTreeChangeListener( PsiManager.getInstance(project).getModificationTracker(), onChange); PsiManager.getInstance(project).addPsiTreeChangeListener(psiListener, disposable); }