public static PsiElement @NotNull [] getPsiElementArray(@NotNull DataContext dataContext) {
    PsiElement[] psiElements = PlatformCoreDataKeys.PSI_ELEMENT_ARRAY.getData(dataContext);
    if (psiElements == null || psiElements.length == 0) {
      PsiElement element = CommonDataKeys.PSI_ELEMENT.getData(dataContext);
      if (element != null) {
        psiElements = new PsiElement[]{element};
      }
    }

    return psiElements != null ? psiElements : PsiElement.EMPTY_ARRAY;
  }
public static PsiElement @NotNull [] getPsiElementArray(@NotNull DataContext dataContext)