@Override
  protected void showPopup(AnActionEvent e, ListPopup popup) {
    Editor editor = e.getData(CommonDataKeys.EDITOR);
    if (editor != null) {
      popup.showInBestPositionFor(editor);
    }
    else {
      super.showPopup(e, popup);
    }
  }
@Override
  protected void showPopup(AnActionEvent e, ListPopup popup)