rem:  try { prefs = Components.classes['component: if (prefs) prefs = prefs.getService(); if (prefs) prefs = prefs.QueryInterface(Components.interfaces.nsIPref); if (prefs) return prefs; else dump("failed to get prefs service!\n");  } catch(ex) { dump("failed to get prefs service!\n"); }  
add:  GetPrefsService();  
context: function EditorStartup(editorType, editorElement){  contentWindow = window.content;  sourceContentWindow = document.getElementById("HTMLSourceWindow");    // store the editor shell in the window, so that child windows can get to it.  editorShell = editorElement.editorShell;    editorShell.Init();  editorShell.SetEditorType(editorType);  editorShell.webShellWindow = window;  editorShell.contentWindow = contentWindow;  // hide UI that we don't have components for  HideInapplicableUIElements();  // set up JS-implemented commands  SetupControllerCommands();    // add a listener to be called when document is really done loading  editorShell.RegisterDocumentStateListener( DocumentStateListener );   // Store the prefs object  try {    prefs = Components.classes['component://netscape/preferences'];    if (prefs) prefs = prefs.getService();    if (prefs) prefs = prefs.QueryInterface(Components.interfaces.nsIPref);    if (prefs)      return prefs;    else      dump("failed to get prefs service!\n");  }  catch(ex)  {	  dump("failed to get prefs service!\n");  }   // Get url for editor content and load it.  // the editor gets instantiated by the editor shell when the URL has finished loading.  var url = document.getElementById("args").getAttribute("value");dump("EditorStartup: url="+url+"\n");  editorShell.LoadUrl(url);}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/3482bd64750a53d9dcb4841b64aecadc75ca40d7/EditorCommands.js/buggy/editor/ui/composer/content/EditorCommands.js