ModifiableRootModel (@NotNull final Module module) { final Project project = module.getProject(); final ModulesConfigurator configurator = getModulesConfigurator(project); if (configurator != null) { if (!configurator.isModuleModelCommitted()) { final ModuleEditor moduleEditor = configurator.getModuleEditor(module); if (moduleEditor != null) { return moduleEditor.getModifiableRootModelProxy(); } } } return ModuleRootManager.getInstance(module).getModifiableModel(); }