private static void setSelectionAndCaret(@NotNull Editor editor, @Nullable final PsiElement callElement) {
    editor.getSelectionModel().removeSelection();
    if (callElement != null) {
      final int offset = callElement.getTextOffset();
      editor.getCaretModel().moveToOffset(offset);
    }
  }
private static void setSelectionAndCaret(@NotNull Editor editor, @Nullable final PsiElement callElement)