@Override
  public void actionPerformed(@NotNull final AnActionEvent e) {
    final Editor editor = e.getData(CommonDataKeys.EDITOR_EVEN_IF_INACTIVE);
    if (editor == null) return;
    final String prefix = myTextField.getText().substring(0, myTextField.getCaretPosition());
    if (StringUtil.isEmpty(prefix)) return;

    final String[] array = calcWords(prefix, editor);
    if (array.length == 0) {
      return;
    }

    final JList<String> list = new JBList<>(array) {
      @Override
      protected void paintComponent(final Graphics g) {
        GraphicsUtil.setupAntialiasing(g);
        super.paintComponent(g);
      }
    };
    list.setBackground(new JBColor(new Color(235, 244, 254), new Color(0x4C4F51)));
    list.setFont(editor.getColorsScheme().getFont(EditorFontType.PLAIN));

    Utils.showCompletionPopup(
      e.getInputEvent() instanceof MouseEvent ? myTextField: null,
      list, null, myTextField, null);
  }
@Override
  public void actionPerformed(@NotNull final AnActionEvent e)