void () { WriteCommandAction.writeCommandAction(getProject()).run(() -> { VirtualFile root = getTempDir().createVirtualDir(); PsiTestUtil.addContentRoot(myModule, root); final ModifiableRootModel model = ModuleRootManager.getInstance(myModule).getModifiableModel(); try { List<FrameworkSupportConfigurable> selectedConfigurables = new ArrayList<>(); ModifiableModelsProvider modelsProvider = new IdeaModifiableModelsProvider(); for (FrameworkSupportNode node : myNodes.values()) { if (node.isChecked()) { final FrameworkSupportInModuleConfigurable configurable = getOrCreateConfigurable(node.getUserObject()); configurable.addSupport(myModule, model, modelsProvider); if (configurable instanceof OldFrameworkSupportProviderWrapper.FrameworkSupportConfigurableWrapper) { selectedConfigurables .add(((OldFrameworkSupportProviderWrapper.FrameworkSupportConfigurableWrapper)configurable).getConfigurable()); } } } for (FrameworkSupportCommunicator communicator : FrameworkSupportCommunicator.EP_NAME.getExtensions()) { communicator.onFrameworkSupportAdded(myModule, model, selectedConfigurables, myFrameworkSupportModel); } } finally { model.commit(); } for (FrameworkSupportInModuleConfigurable configurable : myConfigurables.values()) { Disposer.dispose(configurable); } }); }