ModuleBuilder () { ProjectTemplate template = getSelectedTemplate(); if (template != null) { return myBuilders.get(template); } TemplatesGroup group = getSelectedGroup(); if (group == null) return null; return group.getModuleBuilder(); }