@Override
    public void focusGained(@NotNull Editor editor) {
      if (LookupManager.getActiveLookup(editor) == null) {
        editor.getSelectionModel().setSelection(0, editor.getDocument().getTextLength());
      }
    }
@Override
    public void focusGained(@NotNull Editor editor)