OptCheckbox (@NotNull @NlsContexts.Label String label, @NotNull List<@NlsSafe String> visibility, @NotNull List<@NlsSafe String> tags) { List<OptRegularComponent> controls = new ArrayList<>(); if (!visibility.isEmpty()) { controls.add(dropdown("MINIMAL_VISIBILITY", JavaBundle.message("inspection.missingJavadoc.label.minimalVisibility"), visibility, Function.identity(), Function.identity())); } if (!tags.isEmpty()) { //noinspection LanguageMismatch controls.add(group(JavaBundle.message("inspection.missingJavadoc.label.requiredTags"), ContainerUtil.map2Array(tags, OptRegularComponent.class, tag -> checkbox(tag, tag))) .prefix("REQUIRED_TAGS")); } return new OptPane(controls).asCheckbox("ENABLED", label); }