public static void showCompletionPopup(JComponent toolbarComponent,
                                         List<String> list,
                                         @NlsContexts.PopupTitle String title,
                                         JTextComponent textField,
                                         @NlsContexts.PopupAdvertisement String ad,
                                         @Nls @Nullable String accessibleName) {

    final IPopupChooserBuilder<String> builder = JBPopupFactory.getInstance().createPopupChooserBuilder(list);
    if (title != null) builder.setTitle(title);
    if (accessibleName != null) builder.setAccessibleName(accessibleName);
    final JBPopup popup = builder
      .setMovable(false)
      .setResizable(false)
      .setRequestFocus(true)
      .setItemChosenCallback(s -> {
        textField.setText(s);
        IdeFocusManager.getGlobalInstance().requestFocus(textField, false);
      })
      .setRenderer(new GroupedItemsListRenderer<>(new ListItemDescriptorAdapter<>() {
        @Override
        public @Nullable String getTextFor(@NlsContexts.ListItem String item) { return item; }
      }))
      .createPopup();

    if (ad != null) popup.setAdText(ad, SwingConstants.LEFT);

    JComponent parent = toolbarComponent != null ? toolbarComponent : textField;
    AlignedPopup.showUnderneathWithoutAlignment(popup, parent);
  }
public static void showCompletionPopup(JComponent toolbarComponent,
                                         List<String> list,
                                         @NlsContexts.PopupTitle String title,
                                         JTextComponent textField,
                                         @NlsContexts.PopupAdvertisement String ad,
                                         @Nls @Nullable String accessibleName)