rem: var tree = this.getTree(); 
context: function nsTreeController_copy(tree){    var tree = this.getTree();    var select_list = tree.selectedItems;    if (!select_list) return false;    if (select_list.length < 1) return false;        var datasource = tree.database;    // Build a url that encodes all the select nodes     // as well as their parent nodes    var url = "";    var text = "";    var html = "";    for (var nodeIndex = 0; nodeIndex < select_list.length; nodeIndex++)    {        var node = select_list[nodeIndex];        if (!node) continue;        // for now just use the .id attribute.. at some point we should support        // the #URL property for anonymous resources (see bookmarks.js)        //var ID = getAbsoluteID("bookmarksTree", node);        var ID = node.id;                var IDRes = RDF.GetResource(ID);        var nameNode = datasource.GetTarget(IDRes, nameResource, true);        nameNode =            nameNode.QueryInterface(nsIRDFLiteral);                var theName = nameNode.Value;        url += "ID:{" + ID + "};";        url += "NAME:{" + theName + "};";        if (isContainer(node))        {            // gack, need to generalize this            var type = node.getAttribute("type");            if (type == seperatorUri)            {                // Note: can't encode separators in text, just html                html += "<hr><p>";            }            else            {                text += ID + "\r";                            html += "<a href='" + ID + "'>";                if (theName) html += theName;                html += "</a><p>";            }        }    }    if (url == "") return false;    // get some useful components    var trans = Components.classes[nsTransferable_contractid].createInstance(nsITransferable);    Clipboard.emptyClipboard(nsIClipboard.kGlobalClipboard);    this.SetTransferData(trans, "moz/bookmarkclipboarditem", url);    this.SetTransferData(trans, "text/unicode", text);    this.SetTransferData(trans, "text/html", html);    Clipboard.setData(trans, null, nsIClipboard.kGlobalClipboard);    return true;}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/b6269a319650a05c78b29aef853096d70c7a6398/nsTreeController.js/clean/xpfe/global/resources/content/nsTreeController.js