@Override
    void replaceWithSorted(PsiElement origin) {
      PsiArrayInitializerMemberValue context = getContext(origin);
      if (context == null) return;
      SortableList sortableList = readEntries(context);
      if (sortableList == null) return;
      sortableList.sort();
      String replacement = generateReplacementText(sortableList);
      PsiElementFactory factory = JavaPsiFacade.getElementFactory(origin.getProject());
      PsiAnnotation annotation = factory.createAnnotationFromText("@Ann(" + replacement + ")", null);
      PsiAnnotationMemberValue replacementElement = annotation.getParameterList().getAttributes()[0].getValue();
      assert replacementElement != null;
      context.replace(replacementElement);
    }
@Override
    void replaceWithSorted(PsiElement origin)