boolean (DataContext context, String search, Function<? super ColorAndFontOptions, ? extends SearchableConfigurable> function) { ColorAndFontOptions options = new ColorAndFontOptions(); SearchableConfigurable page = function.apply(options); Configurable[] configurables = options.getConfigurables(); try { if (page != null) { Runnable runnable = search == null ? null : page.enableSearch(search); Window window = ComponentUtil.getWindow(PlatformCoreDataKeys.CONTEXT_COMPONENT.getData(context)); if (window != null) { ShowSettingsUtil.getInstance().editConfigurable(window, page, runnable); } else { ShowSettingsUtil.getInstance().editConfigurable(CommonDataKeys.PROJECT.getData(context), page, runnable); } } } finally { for (Configurable configurable : configurables) configurable.disposeUIResources(); options.disposeUIResources(); } return page != null; }