void (@NotNull Step step, @NotNull String group, @Nullable String name) { if (step instanceof ProjectTypeStep projectTypeStep && !projectTypeStep.setSelectedTemplate(group, name)) { throw new IllegalArgumentException( group + '/' + name + " template not found. " + "Available groups: " + projectTypeStep.availableTemplateGroupsToString() ); } if (step instanceof ChooseTemplateStep) { if (name != null) { ChooseTemplateStep chooseTemplateStep = (ChooseTemplateStep)step; if (!chooseTemplateStep.setSelectedTemplate(name)) { throw new IllegalArgumentException( group + '/' + name + " template not found. " + "Available groups: " + chooseTemplateStep.getTemplateList().availableProjectTemplatesToString() ); } } } }