From e963333629099a12d76e7c4694989627b5a24502 Mon Sep 17 00:00:00 2001 From: anna Date: Mon, 30 Nov 2009 18:55:03 +0300 Subject: [PATCH] simplify --- .../intellij/openapi/keymap/impl/ui/ActionsTreeUtil.java | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/openapi/keymap/impl/ui/ActionsTreeUtil.java b/platform/platform-impl/src/com/intellij/openapi/keymap/impl/ui/ActionsTreeUtil.java index c57d393d52..aad930fb30 100644 --- a/platform/platform-impl/src/com/intellij/openapi/keymap/impl/ui/ActionsTreeUtil.java +++ b/platform/platform-impl/src/com/intellij/openapi/keymap/impl/ui/ActionsTreeUtil.java @@ -28,7 +28,6 @@ import com.intellij.openapi.keymap.KeyMapBundle; import com.intellij.openapi.keymap.Keymap; import com.intellij.openapi.keymap.KeymapExtension; import com.intellij.openapi.keymap.ex.KeymapManagerEx; -import com.intellij.openapi.options.ShowSettingsUtil; import com.intellij.openapi.project.Project; import com.intellij.openapi.util.Comparing; import com.intellij.openapi.util.Condition; @@ -253,8 +252,7 @@ public class ActionsTreeUtil { for (QuickList quickList : quickLists) { if (filtered != null && filtered.value(ActionManagerEx.getInstanceEx().getAction(quickList.getActionId()))) { group.addQuickList(quickList); - } else if (SearchUtil.isComponentHighlighted(quickList.getDisplayName(), filter, forceFiltering, - ShowSettingsUtil.getInstance().findApplicationConfigurable(KeymapConfigurable.class))) { + } else if (SearchUtil.isComponentHighlighted(quickList.getDisplayName(), filter, forceFiltering, null)) { group.addQuickList(quickList); } else if (filtered == null && filter == null) { group.addQuickList(quickList); @@ -393,14 +391,13 @@ public class ActionsTreeUtil { mainGroup.addGroup(otherGroup); mainGroup.addGroup(createPluginsActionsGroup(filtered, otherGroup)); if (filter != null || filtered != null) { - final KeymapConfigurable keymapConfigurable = ShowSettingsUtil.getInstance().findApplicationConfigurable(KeymapConfigurable.class); final ArrayList list = mainGroup.getChildren(); for (Iterator i = list.iterator(); i.hasNext();) { final Object o = i.next(); if (o instanceof Group) { final Group group = (Group)o; if (group.getSize() == 0) { - if (!SearchUtil.isComponentHighlighted(group.getName(), filter, forceFiltering, keymapConfigurable)) { + if (!SearchUtil.isComponentHighlighted(group.getName(), filter, forceFiltering, null)) { i.remove(); } } @@ -416,13 +413,11 @@ public class ActionsTreeUtil { if (filter == null) return true; if (action == null) return false; final String insensitiveFilter = filter.toLowerCase(); - final KeymapConfigurable keymapConfigurable = - ShowSettingsUtil.getInstance().findApplicationConfigurable(KeymapConfigurable.class); final String text = action.getTemplatePresentation().getText(); if (text != null) { final String lowerText = text.toLowerCase(); if (SearchUtil - .isComponentHighlighted(lowerText, insensitiveFilter, force, keymapConfigurable)) { + .isComponentHighlighted(lowerText, insensitiveFilter, force, null)) { return true; } else if (lowerText.indexOf(insensitiveFilter) != -1) { @@ -433,7 +428,7 @@ public class ActionsTreeUtil { if (description != null) { final String insensitiveDescription = description.toLowerCase(); if (SearchUtil - .isComponentHighlighted(insensitiveDescription, insensitiveFilter, force, keymapConfigurable)) { + .isComponentHighlighted(insensitiveDescription, insensitiveFilter, force, null)) { return true; } else if (insensitiveDescription.indexOf(insensitiveFilter) != -1) { -- 2.11.4.GIT