rem: dd ("get scripts context...");  
context: function scv_getcx(cx){    dd ("get scripts context...");        if (!cx)        cx = new Object();    var selection = this.outliner.selection;    var row = selection.currentIndex;    var rec = this.childData.locateChildByVisualRow (row);    var firstRec = rec;        if (!rec)    {        dd ("no record at currentIndex " + row);        return cx;    }        cx.target = rec;        if (rec instanceof ScriptContainerRecord)    {        cx.url = cx.fileName = rec.fileName;        cx.scriptRec = rec.childData[0];        cx.scriptRecList = new Array();        for (var i in rec.childData)            cx.scriptRecList.push(rec.childData[i]);    }    else if (rec instanceof ScriptRecord)    {        cx.url = cx.fileName = rec.script.fileName;        cx.scriptRec = rec;        cx.lineNumber = rec.script.baseLineNumber;        cx.rangeStart = cx.lineNumber;        cx.rangeEnd   = rec.script.lineExtent + cx.lineNumber;    }    var rangeCount = this.outliner.selection.getRangeCount();    if (rangeCount > 0 && !("lineNumberList" in cx))    {        cx.lineNumberList = new Array();    }        dd ("rangeCount is " + rangeCount);    if (rangeCount > 0)    {        cx.fileNameList   = new Array();        if (firstRec instanceof ScriptRecord)            cx.scriptRecList  = new Array();        cx.lineNumberList = new Array();        cx.rangeStartList = new Array();        cx.rangeEndList   = new Array();            }        for (var range = 0; range < rangeCount; ++range)    {        var min = new Object();        var max = new Object();        this.outliner.selection.getRangeAt(range, min, max);        min = min.value;        max = max.value;        dd ("range " + min + " ... " + max);        for (row = min; row <= max; ++row)        {            rec = this.childData.locateChildByVisualRow(row);            if (rec instanceof ScriptContainerRecord)            {                cx.fileNameList.push (rec.fileName);            }            else if (rec instanceof ScriptRecord)            {                cx.fileNameList.push (rec.script.fileName);                if (firstRec instanceof ScriptRecord)                    cx.scriptRecList.push (rec);                cx.lineNumberList.push (rec.script.baseLineNumber);                cx.rangeStartList.push (rec.script.baseLineNumber);                cx.rangeEndList.push (rec.script.lineExtent +                                      rec.script.baseLineNumber);            }        }    }    return cx;}    
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/7544d3415d65bb702cb3060dd8ac2a22f009997b/venkman-outliners.js/buggy/extensions/venkman/resources/content/venkman-outliners.js