private static List<AutoCompletionCommand> getCompletions(Collection<SearchEverywhereContributor<?>> contributors,
                                                            JTextComponent textComponent) {

    return contributors.stream()
      .filter(c -> c instanceof AutoCompletionContributor)
      .map(c -> ((AutoCompletionContributor)c))
      .flatMap(c -> c.getAutocompleteItems(textComponent.getText(), textComponent.getCaretPosition()).stream())
      .collect(Collectors.toList());
  }
private static List<AutoCompletionCommand> getCompletions(Collection<SearchEverywhereContributor<?>> contributors,
                                                            JTextComponent textComponent)