rem: var haveSelection = (tree.selectedItems.length > 0) return haveCommand && haveSelection; 
add: var haveSelection = (tree.selectedItems.length > 0); return (haveCommand && haveSelection); 
context:     isCommandEnabled: function(command)    {        var haveCommand;        switch (command)        {            // commands which do not require selection            case "cmd_paste":                return (this.doPaste != undefined);                            case "cmd_selectAll":                // we can always select all                return true;                            // these commands require selection            case "cmd_cut":                haveCommand = (this.cut != undefined);                break;            case "cmd_copy":                haveCommand = (this.copy != undefined);                break;            case "cmd_delete":                haveCommand = (this.doDelete != undefined);                break;        }                // if we get here, then we have a command that requires selection        var tree = this.getTree();        var haveSelection = (tree.selectedItems.length > 0)        return haveCommand && haveSelection;    },
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/3a7d1b7157e624ce0fac3862a5ffa5705424b711/nsTreeController.js/buggy/xpfe/global/resources/content/nsTreeController.js