TextEditGroup group,
IProgressMonitor monitor) throws JavaModelException {
if (unit == null || comparator == null) {
throw new IllegalArgumentException();
}
SortElementsOperation operation = new SortElementsOperation(unit.getAST().apiLevel(), new IJavaElement[] { unit.getJavaElement() }, null, comparator);
return operation.calculateEdit(unit, group);
}