protected String getUndoText() {
        if (!canUndo()) {
            return "Cannot undo.";
        }
        int i = insertionPoint - 1;
        for (; (i >= 0) && (!edits.get(i).isSignificant()); i--) {
            String description = edits.get(i).describeUndo();
            if (!description.equals("undo")) {
                return description;
            }
        }
        if ((i >= 0) && (edits.get(i).isSignificant())) {
            String description = edits.get(i).describeUndo();
            if (!description.equals("undo")) {
                return description;
            }
        }
        return "undo";
    }