rem: var folderOutliner = GetFolderOutliner(); var startIndex = {}; var endIndex = {}; folderOutliner.outlinerBoxObject.selection.getRangeAt(0, startIndex, endIndex); if (startIndex.value < 0) return false; 
add: var folderTree = GetFolderTree(); var startIndex = {}; var endIndex = {}; folderTree.treeBoxObject.selection.getRangeAt(0, startIndex, endIndex); if (startIndex.value < 0) return false; 
context: function IsCompactFolderEnabled(){  var folderURI = GetSelectedFolderURI();  var server = GetServer(folderURI);  if (!(server.canCompactFoldersOnServer))    return false;    var folderOutliner = GetFolderOutliner();    var startIndex = {};    var endIndex = {};    folderOutliner.outlinerBoxObject.selection.getRangeAt(0, startIndex, endIndex);    if (startIndex.value < 0)         return false;    var folderResource = GetFolderResource(folderOutliner, startIndex.value);    if (! folderResource)         return false;    return GetFolderAttribute(folderOutliner, folderResource, "CanCompact") == "true" && isCommandEnabled("cmd_compactFolder");}
meta: 5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5872/d38a0937d9c93a0a9d913e2ac781e4328bb8cc73/mailWindowOverlay.js/buggy/mailnews/base/resources/content/mailWindowOverlay.js