@NotNull
  MatchMode actionMatches(@NotNull String pattern, com.intellij.util.text.Matcher matcher, @NotNull AnAction anAction) {
    Presentation presentation = anAction.getTemplatePresentation().clone();
    anAction.applyTextOverride(ActionPlaces.ACTION_SEARCH, presentation);
    String text = presentation.getText();
    String description = presentation.getDescription();
    if (text != null && matcher.matches(text)) {
      return MatchMode.NAME;
    }
    for (Supplier<String> synonym : anAction.getSynonyms()) {
      if (matcher.matches(synonym.get())) {
        return MatchMode.SYNONYM;
      }
    }
    if (description != null && !description.equals(text) && new WordPrefixMatcher(pattern).matches(description)) {
      return MatchMode.DESCRIPTION;
    }
    if (text == null) {
      return MatchMode.NONE;
    }
    GroupMapping groupMapping = myActionGroups.get(anAction);
    if (groupMapping != null) {
      for (String groupName : groupMapping.getAllGroupNames()) {
        if (matcher.matches(groupName + " " + text)) {
          return anAction instanceof ToggleAction ? MatchMode.NAME : MatchMode.GROUP;
        }
        if (matcher.matches(text + " " + groupName)) {
          return MatchMode.GROUP;
        }
      }
    }

    for (GotoActionAliasMatcher m : GotoActionAliasMatcher.EP_NAME.getExtensions()) {
      MatchMode match = m.matchAction(anAction, pattern);
      if (match != MatchMode.NONE) {
        return match;
      }
    }
    return MatchMode.NONE;
  }
@NotNull
  MatchMode actionMatches(@NotNull String pattern, com.intellij.util.text.Matcher matcher, @NotNull AnAction anAction)