rem: for (var i = 0; i < flavours.length; ++i) { 
add: for (i = 0; i < flavours.length; ++i) { 
context:   isCommandEnabled: function (aCommand, aSelection, aTarget)  {    var length   = aSelection.length;    if (length == 0)      return false;    var isValidTarget = BookmarksUtils.isValidTargetContainer(aTarget.parent)    var item0    = aSelection.item[0].Value;    var type0    = aSelection.type[0];    var isNotRef = !aSelection.isRef;    switch(aCommand) {    case "cmd_undo":    case "cmd_redo":    case "cmd_bm_undo":    case "cmd_bm_redo":      return true;    case "cmd_bm_paste":      if (!isValidTarget)        return false;      const kClipboardContractID = "@mozilla.org/widget/clipboard;1";      const kClipboardIID = Components.interfaces.nsIClipboard;      var clipboard = Components.classes[kClipboardContractID].getService(kClipboardIID);      const kSuppArrayContractID = "@mozilla.org/supports-array;1";      const kSuppArrayIID = Components.interfaces.nsISupportsArray;      var flavourArray = Components.classes[kSuppArrayContractID].createInstance(kSuppArrayIID);      const kSuppStringContractID = "@mozilla.org/supports-cstring;1";      const kSuppStringIID = Components.interfaces.nsISupportsCString;          var flavours = ["moz/bookmarkclipboarditem", "text/x-moz-url"];      for (var i = 0; i < flavours.length; ++i) {        const kSuppString = Components.classes[kSuppStringContractID].createInstance(kSuppStringIID);        kSuppString.data = flavours[i];        flavourArray.AppendElement(kSuppString);      }      var hasFlavours = clipboard.hasDataMatchingFlavors(flavourArray, kClipboardIID.kGlobalClipboard);      return hasFlavours;    case "cmd_bm_copy":      return isNotRef;    case "cmd_bm_cut":    case "cmd_bm_delete":      return isNotRef && aSelection.containsMutable;    case "cmd_bm_selectAll":      return true;    case "cmd_bm_open":    case "cmd_bm_expandfolder":    case "cmd_bm_managefolder":      return isNotRef && length == 1;    case "cmd_bm_openinnewwindow":    case "cmd_bm_openinnewtab":      return true;    case "cmd_bm_openfolder":      for (var i=0; i<aSelection.length; ++i) {        if (aSelection.type[i] == ""         ||            aSelection.type[i] == "Bookmark" ||            aSelection.type[i] == "BookmarkSeparator")          return false;        RDFC.Init(BMDS, aSelection.item[i]);        var children = RDFC.GetElements();        while (children.hasMoreElements()) {          if (BookmarksUtils.resolveType(children.getNext()) == "Bookmark")            return true;        }      }      return false;    case "cmd_bm_find":    case "cmd_bm_import":    case "cmd_bm_export":      return true;    case "cmd_bm_newbookmark":    case "cmd_bm_newfolder":    case "cmd_bm_newseparator":      return isValidTarget && length == 1;    case "cmd_bm_properties":    case "cmd_bm_rename":      return isNotRef && length == 1;    case "cmd_bm_setnewbookmarkfolder":      if (!isNotRef || length != 1)         return false;      return item0 != "NC:NewBookmarkFolder"     &&             (type0 == "Folder" || type0 == "PersonalToolbarFolder");    case "cmd_bm_setpersonaltoolbarfolder":      if (!isNotRef || length != 1)        return false      return item0 != "NC:PersonalToolbarFolder" && type0 == "Folder";    case "cmd_bm_setnewsearchfolder":      if (!isNotRef || length != 1)        return false      return item0 != "NC:NewSearchFolder"       &&              (type0 == "Folder" || type0 == "PersonalToolbarFolder");    case "cmd_bm_movebookmark":      return isNotRef;    default:      return false;    }  },
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/4bf20c68ab8093bce1bbf66402f44c35e37e354f/bookmarks.js/clean/browser/components/bookmarks/content/bookmarks.js