void (@Nullable @Nls String presentableLibraryName, @NotNull Collection<? extends VirtualFile> oldRoots, @NotNull Collection<? extends VirtualFile> newRoots, @NotNull String libraryNameForDebug) { ApplicationManager.getApplication().runWriteAction( (ExternalChangeAction)() -> { PsiTreeChangeEventImpl treeEvent = new PsiTreeChangeEventImpl(psiManager); treeEvent.setPropertyName(PsiTreeChangeEvent.PROP_ROOTS); psiManager.beforePropertyChange(treeEvent); DebugUtil.performPsiModification(null, fileManager::possiblyInvalidatePhysicalPsi); treeEvent = new PsiTreeChangeEventImpl(psiManager); treeEvent.setPropertyName(PsiTreeChangeEvent.PROP_ROOTS); psiManager.propertyChanged(treeEvent); } ); }