add:  if (searchFolderURIs && (searchFolderURIs != "") && newName && (newName != "")) { try { var newFolder = parentFolder.addSubfolder(newName); newFolder.setFlag(MSG_FOLDER_FLAG_VIRTUAL); var vfdb = newFolder.getMsgDatabase(msgWindow); var searchTermString = getSearchTermString(searchTerms); var dbFolderInfo = vfdb.dBFolderInfo;   dbFolderInfo.setCharPtrProperty("searchStr", searchTermString); dbFolderInfo.setCharPtrProperty("searchFolderUri", searchFolderURIs); dbFolderInfo.setBooleanProperty("searchOnline", searchOnline); vfdb.summaryValid = true; vfdb.Close(true); parentFolder.NotifyItemAdded(newFolder); var accountManager = Components.classes["@mozilla.org/messenger/account-manager;1"].getService(Components.interfaces.nsIMsgAccountManager); accountManager.saveVirtualFolders(); } catch(e) { throw(e); dump ("Exception : creating virtual folder \n"); } } else { dump("no name or nothing selected\n"); } } 
context: function  CreateVirtualFolder(newName, parentFolder, searchFolderURIs, searchTerms, searchOnline)){
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/2fa9f99c1c6ad6873331d26be7bae568008d39e4/commandglue.js/clean/mailnews/base/resources/content/commandglue.js