CodeStyleSettingsCustomizable (@NotNull Collection<String> names, @NotNull CodeStyleSettingsCustomizable original) { return new CodeStyleSettingsCustomizable() { @Override public void showAllStandardOptions() { original.showStandardOptions(ArrayUtilRt.toStringArray(names)); } @Override public void showStandardOptions(String... optionNames) { String[] toShowOptions = Arrays.stream(optionNames).filter(names::contains).toArray(value -> new String[value]); original.showStandardOptions(toShowOptions); } @Override public void showCustomOption(@NotNull Class<? extends CustomCodeStyleSettings> settingsClass, @NonNls @NotNull String fieldName, @NlsContexts.Label @NotNull String title, @Nls @Nullable String groupName, Object... options) { if (names.contains(fieldName)) { original.showCustomOption(settingsClass, fieldName, title, groupName, options); } } @Override public void renameStandardOption(@NonNls @NotNull String fieldName, @NlsContexts.Label @NotNull String newTitle) { if (names.contains(fieldName)) { original.renameStandardOption(fieldName, newTitle); } } @Override public void showCustomOption(@NotNull Class<? extends CustomCodeStyleSettings> settingsClass, @NonNls @NotNull String fieldName, @NlsContexts.Label @NotNull String title, @Nls @Nullable String groupName, @Nullable OptionAnchor anchor, @NonNls @Nullable String anchorFieldName, Object... options) { if (names.contains(fieldName)) { original.showCustomOption(settingsClass, fieldName, title, groupName, anchor, anchorFieldName, options); } } }; }