static String[] getKeywords(@NotNull PsiElement position) {
    final PsiModifierList list = findModifierList(position);
    if (list == null && !shouldSuggestModifiers(position)) {
      return ArrayUtilRt.EMPTY_STRING_ARRAY;
    }

    PsiElement scope = position.getParent();
    while (scope != null) {
      if (scope instanceof PsiJavaFile ||
          scope instanceof PsiClass ||
          scope.getParent() instanceof PsiImplicitClass) {
        return addJavaFileMemberModifiers(list, position);
      }
      if (scope.getParent() instanceof PsiClass psiClass) {
        PsiIdentifier identifier = psiClass.getNameIdentifier();
        if (identifier == null ||
            identifier.getTextRange().getStartOffset() < scope.getTextRange().getStartOffset()) {
          return addMemberModifiers(list, psiClass.isInterface(), psiClass);
        }
      }
      scope = scope.getParent();
      if (scope instanceof PsiDirectory) break;
    }
    return ArrayUtilRt.EMPTY_STRING_ARRAY;
  }
static String[] getKeywords(@NotNull PsiElement position)