rem:  function EditorStopLog() { try { var edlog = gEditor.QueryInterface(Components.interfaces.nsIEditorLogging); edlog.stopLogging(); window._content.focus(); } catch(ex) { dump("Can't stop logging!:\n" + ex + "\n"); }  function EditorRunLog() { var fs; fs = EditorGetScriptFileSpec(); EditorExecuteScript(fs); window._content.focus(); }     function DumpUndoStack() { try { var txmgr = GetCurrentEditor().transactionManager;  if (!txmgr) { dump("**** Editor has no TransactionManager!\n"); return; }  dump("---------------------- BEGIN UNDO STACK DUMP\n"); dump("<!-- Bottom of Stack -->\n"); PrintTxnList(txmgr.getUndoList(), ""); dump("<!--  Top of Stack  -->\n"); dump("Num Undo Items: " + txmgr.numberOfUndoItems + "\n"); dump("---------------------- END   UNDO STACK DUMP\n"); } catch (e) { dump("ERROR: DumpUndoStack() failed: " + e); } }  function DumpRedoStack() { try { var txmgr = GetCurrentEditor().transactionManager;  if (!txmgr) { dump("**** Editor has no TransactionManager!\n"); return; }  dump("---------------------- BEGIN REDO STACK DUMP\n"); dump("<!-- Bottom of Stack -->\n"); PrintTxnList(txmgr.getRedoList(), ""); dump("<!--  Top of Stack  -->\n"); dump("Num Redo Items: " + txmgr.numberOfRedoItems + "\n"); dump("---------------------- END   REDO STACK DUMP\n"); } catch (e) { dump("ERROR: DumpUndoStack() failed: " + e); } }  function PrintTxnList(txnList, prefixStr) { var i;  for (i=0 ; i < txnList.numItems; i++) { var txn = txnList.getItem(i); var desc = "TXMgr Batch";  if (txn) { txn = txn.QueryInterface(Components.interfaces.nsPIEditorTransaction); desc = txn.txnDescription; } dump(prefixStr + "+ " + desc + "\n"); PrintTxnList(txnList.getChildListForItem(i), prefixStr + "|    "); } } 
context: function EditorStartLog(){  try {    var edlog = gEditor.QueryInterface(Components.interfaces.nsIEditorLogging);    var fs = EditorGetScriptFileSpec();    edlog.startLogging(fs);    window._content.focus();    fs = null;  }  catch(ex) { dump("Can't start logging!:\n" + ex + "\n");}function EditorStopLog(){  try {    var edlog = gEditor.QueryInterface(Components.interfaces.nsIEditorLogging);    edlog.stopLogging();    window._content.focus();  }  catch(ex) { dump("Can't stop logging!:\n" + ex + "\n");}function EditorRunLog(){  var fs;  fs = EditorGetScriptFileSpec();  EditorExecuteScript(fs);  window._content.focus();}// --------------------------- TransactionManager ---------------------------function DumpUndoStack(){  try {    var txmgr = GetCurrentEditor().transactionManager;    if (!txmgr)    {      dump("**** Editor has no TransactionManager!\n");      return;    }    dump("---------------------- BEGIN UNDO STACK DUMP\n");    dump("<!-- Bottom of Stack -->\n");    PrintTxnList(txmgr.getUndoList(), "");    dump("<!--  Top of Stack  -->\n");    dump("Num Undo Items: " + txmgr.numberOfUndoItems + "\n");    dump("---------------------- END   UNDO STACK DUMP\n");  } catch (e) {    dump("ERROR: DumpUndoStack() failed: " + e);  }}function DumpRedoStack(){  try {    var txmgr = GetCurrentEditor().transactionManager;    if (!txmgr)    {      dump("**** Editor has no TransactionManager!\n");      return;    }    dump("---------------------- BEGIN REDO STACK DUMP\n");    dump("<!-- Bottom of Stack -->\n");    PrintTxnList(txmgr.getRedoList(), "");    dump("<!--  Top of Stack  -->\n");    dump("Num Redo Items: " + txmgr.numberOfRedoItems + "\n");    dump("---------------------- END   REDO STACK DUMP\n");  } catch (e) {    dump("ERROR: DumpUndoStack() failed: " + e);  }}function PrintTxnList(txnList, prefixStr){  var i;  for (i=0 ; i < txnList.numItems; i++)  {    var txn = txnList.getItem(i);    var desc = "TXMgr Batch";    if (txn)    {      txn = txn.QueryInterface(Components.interfaces.nsPIEditorTransaction);      desc = txn.txnDescription;    }    dump(prefixStr + "+ " + desc + "\n");    PrintTxnList(txnList.getChildListForItem(i), prefixStr + "|    ");  }}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/5fa10e540adac1669643b45e32d43519b4d77a69/EditorCommandsDebug.js/clean/editor/ui/composer/content/EditorCommandsDebug.js