boolean (TemplatesGroup value) { int index = groups.indexOf(value); if (index < 1) return false; TemplatesGroup upper = groups.get(index - 1); if (isNewWizard()) { if (value.getModuleBuilder() instanceof TemplateModuleBuilder && !(upper.getModuleBuilder() instanceof TemplateModuleBuilder)) { return true; } ModuleBuilder builder = upper.getModuleBuilder(); return builder instanceof NewEmptyProjectBuilder || builder instanceof NewModuleBuilder; } if (upper.getParentGroup() == null && value.getParentGroup() == null) return true; return !Objects.equals(upper.getParentGroup(), value.getParentGroup()) && !Objects.equals(upper.getName(), value.getParentGroup()); }