<commit_before>// Copyright (c) 2011-2012 UX Productivity Pty Ltd. All rights reserved.

// FIXME: place a limit on the number of undo steps recorded - say, 30-50?

var UndoManager_getLength;
var UndoManager_getIndex;
var UndoManager_setIndex;
var UndoManager_print;
var UndoManager_undo;
var UndoManager_redo;
var UndoManager_addAction;
var UndoManager_newGroup;
var UndoManager_groupType;
var UndoManager_disableWhileExecuting;

(function() {

    function UndoGroup(type)
    {
        this.type = type;
        this.actions = new Array();
    }

    function UndoAction(fun,args)
    {
        this.fun = fun;
        this.args = args;
    }

    UndoAction.prototype.toString = function()
    {
        if (this.fun.wrappedName != null)
            return this.fun.wrappedName + "(" + this.args.toString() + ")";
        else
            return this.fun.name + "(" + this.args.toString() + ")";
    }

    var undoStack = new Array();
    var redoStack = new Array();
    var inUndo = false;
    var inRedo = false;
    var currentGroup = null;
    var disabled = 0;<commit_msg>Changed UndoAction.prototype.toString() to return the nodeString() of node arguments<commit_after>// Copyright (c) 2011-2012 UX Productivity Pty Ltd. All rights reserved.

// FIXME: place a limit on the number of undo steps recorded - say, 30-50?

var UndoManager_getLength;
var UndoManager_getIndex;
var UndoManager_setIndex;
var UndoManager_print;
var UndoManager_undo;
var UndoManager_redo;
var UndoManager_addAction;
var UndoManager_newGroup;
var UndoManager_groupType;
var UndoManager_disableWhileExecuting;

(function() {

    function UndoGroup(type)
    {
        this.type = type;
        this.actions = new Array();
    }

    function UndoAction(fun,args)
    {
        this.fun = fun;
        this.args = args;
    }

    UndoAction.prototype.toString = function()
    {
        var name;
        if (this.fun.wrappedName != null)
            name = this.fun.wrappedName;
        else
            name = this.fun.name;

        var argStrings = new Array();
        for (var i = 0; i < this.args.length; i++) {
            if (this.args[i] instanceof Node)
                argStrings.push(nodeString(this.args[i]));
            else if (this.args[i] == null)
                argStrings.push("null");
            else
                argStrings.push(this.args[i].toString());
        }

        return name + "(" + argStrings.join(",") + ")";
    }

    var undoStack = new Array();
    var redoStack = new Array();
    var inUndo = false;
    var inRedo = false;
    var currentGroup = null;
    var disabled = 0;
{'fraction_non_alphanumeric': 0.10812883435582822, 'fraction_numerical': 0.010352760736196318, 'mean_word_length': 2.5209176788124155, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5959902', 'n_tokens_mistral': 846, 'n_tokens_neox': 807, 'n_words': 213}