FacetEditorContext (final @NotNull Facet facet, final @Nullable FacetEditorContext parentContext) { Module module = facet.getModule(); ModulesConfigurator modulesConfigurator = myContext.getModulesConfigurator(); ModuleEditor moduleEditor = modulesConfigurator.getModuleEditor(module); if (moduleEditor == null) { LOG.error("ModuleEditor[" + module.getName() + "]==null: disposed = " + module.isDisposed() + ", is in model = " + Arrays.asList(modulesConfigurator.getModules()).contains(module)); } final ModuleConfigurationState state = moduleEditor.createModuleConfigurationState(); return new MyProjectConfigurableContext(facet, parentContext, state, modulesConfigurator.getProjectStructureConfigurable()); }