void (@NotNull Project project, @NotNull String moduleName) { Module module = ModuleManager.getInstance(project).findModuleByName(moduleName); if (module != null) { setSelectedModule(module); } else { UnloadedModuleDescription description = ModuleManager.getInstance(project).getUnloadedModuleDescription(moduleName); if (description != null) { if (myModel.indexOf(description) < 0) { myModel.add(description); } myModel.setSelectedItem(description); } else { myModel.setSelectedItem(null); } } }