activeContext.getUndo().addChange(ActionMessages.getString("InsertCrosstabOtherGroupAction.UndoName"),
new InsertGroupBodyOnGroupUndoEntry(selectedGroup.getObjectID(), oldGroupBody, newGroupBody));
}
if (selectedElement instanceof CrosstabGroup)
{
final CrosstabGroup selectedGroup = (CrosstabGroup) selectedElement;
final GroupBody oldGroupBody = selectedGroup.getBody();
final CrosstabOtherGroupBody newGroupBody = new CrosstabOtherGroupBody(newGroup);
selectedGroup.setBody(newGroupBody);
newGroup.setBody(oldGroupBody);
activeContext.getUndo().addChange(ActionMessages.getString("InsertCrosstabOtherGroupAction.UndoName"),
new InsertGroupBodyOnGroupUndoEntry(selectedGroup.getObjectID(), oldGroupBody, newGroupBody));
}
}
catch (Exception ex)
{
UncaughtExceptionsModel.getInstance().addException(ex);