Condition<AnAction> (final String filter, final boolean force) { return action -> { if (filter == null) return true; if (action == null) return false; action = tryUnstubAction(action); final String insensitiveFilter = StringUtil.toLowerCase(filter); ArrayList<String> options = new ArrayList<>(); options.add(action.getTemplateText()); options.add(action.getTemplatePresentation().getDescription()); for (Supplier<String> synonym : action.getSynonyms()) { options.add(synonym.get()); } String id = ActionManager.getInstance().getId(action); if (id != null) { options.add(id); options.addAll(AbbreviationManager.getInstance().getAbbreviations(id)); } for (String text : options) { if (text != null) { final String lowerText = StringUtil.toLowerCase(text); if (SearchUtil.isComponentHighlighted(lowerText, insensitiveFilter, force, null) || lowerText.contains(insensitiveFilter)) { return true; } } } return false; }; }