rem:  try { const kFilePickerContractID = "@mozilla.org/filepicker;1"; const kFilePickerIID = Components.interfaces.nsIFilePicker; const kFilePicker = Components.classes[kFilePickerContractID].createInstance(kFilePickerIID);  const kTitle = BookmarksUtils.getLocaleString("SelectImport"); kFilePicker.init(window, kTitle, kFilePickerIID["modeOpen"]); kFilePicker.appendFilters(kFilePickerIID.filterHTML | kFilePickerIID.filterAll); var fileName; if (kFilePicker.show() != kFilePickerIID.returnCancel) { fileName = kFilePicker.file.path; if (!fileName) return; } else return; } catch (e) { return; } rTarget = RDF.GetResource("NC:BookmarksRoot"); RDFC.Init(BMDS, rTarget); var countBefore = parseInt(BookmarksUtils.getProperty(rTarget, RDF_NS+"nextVal")); var args = [{ property: NC_NS+"URL", literal: fileName}]; this.doBookmarksCommand(rTarget, NC_NS_CMD+"import", args); var countAfter = parseInt(BookmarksUtils.getProperty(rTarget, RDF_NS+"nextVal")); 
add: window.fromFile = false; window.openDialog("chrome: "", "modal,centerscreen,chrome,resizable=no", "bookmarks"); 
context:   importBookmarks: function ()  {    ///transaction...    try {      const kFilePickerContractID = "@mozilla.org/filepicker;1";      const kFilePickerIID = Components.interfaces.nsIFilePicker;      const kFilePicker = Components.classes[kFilePickerContractID].createInstance(kFilePickerIID);          const kTitle = BookmarksUtils.getLocaleString("SelectImport");      kFilePicker.init(window, kTitle, kFilePickerIID["modeOpen"]);      kFilePicker.appendFilters(kFilePickerIID.filterHTML | kFilePickerIID.filterAll);      var fileName;      if (kFilePicker.show() != kFilePickerIID.returnCancel) {        fileName = kFilePicker.file.path;        if (!fileName) return;      }      else return;    }    catch (e) {      return;    }    rTarget = RDF.GetResource("NC:BookmarksRoot");    RDFC.Init(BMDS, rTarget);    var countBefore = parseInt(BookmarksUtils.getProperty(rTarget, RDF_NS+"nextVal"));    var args = [{ property: NC_NS+"URL", literal: fileName}];    this.doBookmarksCommand(rTarget, NC_NS_CMD+"import", args);    var countAfter = parseInt(BookmarksUtils.getProperty(rTarget, RDF_NS+"nextVal"));    var transaction = new BookmarkImportTransaction("import");    for (var index = countBefore; index < countAfter; index++) {      var nChildArc = RDFCU.IndexToOrdinalResource(index);      var rChild    = BMDS.GetTarget(rTarget, nChildArc, true);      transaction.item   .push(rChild);      transaction.parent .push(rTarget);      transaction.index  .push(index);      transaction.isValid.push(true);    }    var isCancelled = !BookmarksUtils.any(transaction.isValid);    if (!isCancelled) {      BMSVC.transactionManager.doTransaction(transaction);      BookmarksUtils.flushDataSource();    }      },
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/9421/47a34e2c0b31308537247d1a1bb06f2359aac87d/bookmarks.js/clean/suite/common/bookmarks/bookmarks.js