@Override
  public PsiElement @NotNull [] getMovableSubElements(@NotNull PsiElement element) {
    if (element instanceof PsiParameterList list) {
      return list.getParameters();
    }
    else if (element instanceof PsiExpressionList list) {
      return list.getExpressions();
    }
    else if (element instanceof PsiAnnotationParameterList list) {
      return list.getAttributes();
    }
    else if (element instanceof PsiArrayInitializerExpression arrayInitializer) {
      return arrayInitializer.getInitializers();
    }
    else if (element instanceof PsiArrayInitializerMemberValue arrayInitializerMemberValue) {
      return arrayInitializerMemberValue.getInitializers();
    }
    else if (element instanceof PsiClass cls && cls.isEnum()) {
      PsiEnumConstant[] enumConstants = PsiTreeUtil.getChildrenOfType(element, PsiEnumConstant.class);
      if (enumConstants != null) return enumConstants;
    }
    else if (element instanceof PsiReferenceList list) {
      return list.getReferenceElements();
    }
    else if (element instanceof PsiTypeElement) {
      PsiTypeElement[] result = PsiTreeUtil.getChildrenOfType(element, PsiTypeElement.class);
      if (result != null) return result;
    }
    else if (element instanceof PsiResourceList) {
      PsiElement[] result = PsiTreeUtil.getChildrenOfType(element, PsiResourceListElement.class);
      if (result != null) return result;
    }
    else if (element instanceof PsiPolyadicExpression list) {
      return list.getOperands();
    }
    else if (element instanceof PsiReferenceParameterList list) {
      return list.getTypeParameterElements();
    }
    else if (element instanceof PsiTypeParameterList list) {
      return list.getTypeParameters();
    }
    else if (element instanceof PsiModifierList) {
      final List<PsiElement> elements = PsiTreeUtil.getChildrenOfAnyType(element, PsiKeyword.class, PsiAnnotation.class);
      return elements.toArray(PsiElement.EMPTY_ARRAY);
    }
    else if (element instanceof PsiCaseLabelElementList list) {
      return list.getElements();
    }
    return PsiElement.EMPTY_ARRAY;
  }
@Override
  public PsiElement @NotNull [] getMovableSubElements(@NotNull PsiElement element)