Part of Bug 381343 - move the composer debug options to the debugQA extension r=KaiRo,sr=Neil

This commit is contained in:
bugzilla%standard8.plus.com 2007-08-28 16:05:25 +00:00
Родитель 0cde3c689d
Коммит cefff4ef47
13 изменённых файлов: 189 добавлений и 121 удалений

Просмотреть файл

@ -834,14 +834,6 @@ function CheckAndSaveDocument(command, allowDontSave)
// --------------------------- File menu ---------------------------
function EditorNewPlaintext()
{
window.openDialog( "chrome://editor/content/TextEditorAppShell.xul",
"_blank",
"chrome,dialog=no,all",
"about:blank");
}
// Check for changes to document and allow saving before closing
// This is hooked up to the OS's window close widget (e.g., "X" for Windows)
function EditorCanClose()

Просмотреть файл

@ -79,7 +79,6 @@
persist="screenX screenY width height sizemode">
<script type="application/x-javascript" src="chrome://editor/content/editor.js"/>
<script type="application/x-javascript" src="chrome://editor/content/EditorCommandsDebug.js"/>
<script type="application/x-javascript" src="chrome://editor/content/EditorContextMenu.js"/>
<script type="application/x-javascript" src="chrome://editor/content/StructBarContextMenu.js"/>
<script type="application/x-javascript" src="chrome://editor/content/editorApplicationOverlay.js"/>
@ -183,10 +182,6 @@
<menu id="windowMenu"/>
<!-- DEBUG only -->
<menu id="debugMenu" />
<!-- end DEBUG only -->
<!-- help menu filled from globalOverlay -->
<menu id="menu_Help"/>

Просмотреть файл

@ -916,77 +916,4 @@
-->
<menuitem id="menu_pasteQuote" accesskey="&editpastequotation.accesskey;" command="cmd_pasteQuote" key="pastequotationkb"/>
<!-- DEBUG only -->
<menu id="debugMenu" label="&debugMenu.label;">
<menupopup>
<menuitem label="&newEditorTestPage.label;" oncommand="window.openDialog('chrome://editor/content','_blank','chrome,all,dialog=no','chrome://editor/content/EditorInitPage.html')"/>
<menuitem label="&textEditorCmd.label;" oncommand="EditorNewPlaintext();" />
<menuitem label="&outputTextCmd.label;"
oncommand="EditorGetText()"/>
<menuitem label="&outputHTMLCmd.label;"
oncommand="EditorGetHTML()"/>
<menuseparator />
<menuitem label="&pasteAsQuotationCmd.label;"
accesskey="&editpastequotation.accesskey;"
oncommand="goDoCommand('cmd_pasteQuote')"/>
<menuitem label="&editRewrapCmd.label;"
oncommand="try { GetCurrentEditor().rewrap(true); } catch (e) {}"/>
<menuitem label="&editStripQuotesCmd.label;"
oncommand="try { GetCurrentEditor().stripCites(); } catch (e) {}"/>
<menuitem label="&insertTextCmd.label;"
oncommand="EditorInsertText('All good things come to those who wait. ')"/>
<menuitem id="menu_checkLinks" observes="cmd_checkLinks"
label="&checkLinksCmd.label;"/>
<menuseparator />
<menu accesskey="&insertformmenu.accesskey;" id="insertFormMenu" label="&insertFormMenu.label;">
<menupopup>
<menuitem accesskey="&insertform.accesskey;" command="cmd_form" label="&insertFormCmd.label;"/>
<menuseparator/>
<menuitem accesskey="&insertinputtag.accesskey;" command="cmd_inputtag" label="&insertInputTagCmd.label;"/>
<menuitem accesskey="&insertinputimage.accesskey;" command="cmd_inputimage" label="&insertInputImageCmd.label;"/>
<menuitem accesskey="&inserttextarea.accesskey;" command="cmd_textarea" label="&insertTextAreaCmd.label;"/>
<menuitem accesskey="&insertselect.accesskey;" command="cmd_select" label="&insertSelectCmd.label;"/>
<menuitem accesskey="&insertbutton.accesskey;" command="cmd_button" label="&insertButtonCmd.label;"/>
<menuitem accesskey="&insertlabel.accesskey;" command="cmd_label" label="&insertLabelCmd.label;"/>
<menuitem accesskey="&insertfieldset.accesskey;" command="cmd_fieldset" label="&insertFieldSetCmd.label;"/>
<menuseparator/>
<menuitem accesskey="&insertisindex.accesskey;" command="cmd_isindex" label="&insertIsIndexCmd.label;"/>
</menupopup>
</menu>
<menuitem label="&testSelectionCmd.label;"
oncommand="EditorTestSelection()"/>
<menuitem label="&testTableLayoutCmd.label;"
oncommand="EditorTestTableLayout()"/>
<menuitem label="&showEmbeddedCmd.label;"
oncommand="EditorShowEmbeddedObjects()"/>
<menuitem label="&dumpContentCmd.label;"
oncommand="EditorDumpContent()"/>
<menuitem label="&testDocumentCmd.label;"
oncommand="EditorTestDocument()"/>
<menuitem label="&runUnitTestsCmd.label;"
oncommand="EditorUnitTests()"/>
<menuseparator />
<menuitem label="&dumpUndoStack.label;"
oncommand="DumpUndoStack()"/>
<menuitem label="&dumpRedoStack.label;"
oncommand="DumpRedoStack()"/>
<menuitem label="&executeJSTransactionViaTxmgr.label;"
oncommand="ExecuteJSTransactionViaTxmgr()"/>
<menuitem label="&executeJSTransactionViaEditor.label;"
oncommand="ExecuteJSTransactionViaEditor()"/>
<menuseparator />
<menuitem label="&startLogCmd.label;"
oncommand="EditorStartLog()"/>
<menuitem label="&stopLogCmd.label;"
oncommand="EditorStopLog()"/>
<menuitem label="&runLogCmd.label;"
oncommand="EditorRunLog()"/>
<menuseparator />
<menuitem label="&setFocusCmd.label;"
accesskey="&toolsetfocus.accesskey;"
oncommand="window.focus()"/>
</menupopup>
</menu>
<!-- end DEBUG only -->
</overlay>

Просмотреть файл

@ -14,16 +14,12 @@ comm.jar:
* content/editor-region/contents.rdf (composer/content/contents-region.rdf)
#endif
content/editor/editor.xul (composer/content/editor.xul)
content/editor/TextEditorAppShell.xul (composer/content/TextEditorAppShell.xul)
content/editor/editor.js (composer/content/editor.js)
content/editor/publishprefs.js (composer/content/publishprefs.js)
content/editor/editorUtilities.js (composer/content/editorUtilities.js)
content/editor/ComposerCommands.js (composer/content/ComposerCommands.js)
content/editor/EditorCommandsDebug.js (composer/content/EditorCommandsDebug.js)
content/editor/EditorContextMenu.js (composer/content/EditorContextMenu.js)
content/editor/EditorContextMenuOverlay.xul (composer/content/EditorContextMenuOverlay.xul)
content/editor/EditorInitPage.html (composer/content/EditorInitPage.html)
content/editor/EditorInitPagePlain.html (composer/content/EditorInitPagePlain.html)
content/editor/EditorExtra.css (composer/content/EditorExtra.css)
content/editor/EditorAllTags.css (composer/content/EditorAllTags.css)
content/editor/EditorParagraphMarks.css (composer/content/EditorParagraphMarks.css)

Просмотреть файл

@ -39,7 +39,6 @@
<!-- LOCALIZATION NOTE (editorWindow.titlemodifier): DONT_TRANSLATE -->
<!ENTITY editorWindow.titlemodifier "Composer">
<!ENTITY editorWindow.titlemodifiermenuseparator " - ">
<!ENTITY textEditorWindow.titlemodifier "Text Editor">
<!-- Menu items: the . means that the menu item isn't implemented yet -->

Просмотреть файл

@ -486,28 +486,6 @@
<!ENTITY toolplaineditor.accesskey "p">
<!ENTITY toolsetfocus.accesskey "f">
<!-- Debug menu items -->
<!ENTITY debugMenu.label "Debug">
<!ENTITY newEditorTestPage.label "Composer with Test Page">
<!ENTITY textEditorCmd.label "Plaintext Editor">
<!ENTITY outputTextCmd.label "Output Text">
<!ENTITY outputHTMLCmd.label "Output HTML">
<!ENTITY insertTextCmd.label "Insert Text">
<!ENTITY testSelectionCmd.label "Test Selection">
<!ENTITY testTableLayoutCmd.label "Test Table Layout">
<!ENTITY testDocumentCmd.label "Test Document">
<!ENTITY showEmbeddedCmd.label "Show Embedded Objects">
<!ENTITY dumpContentCmd.label "Dump Content Tree">
<!ENTITY runUnitTestsCmd.label "Run Unit Tests">
<!ENTITY dumpUndoStack.label "Dump Undo Stack">
<!ENTITY dumpRedoStack.label "Dump Redo Stack">
<!ENTITY executeJSTransactionViaTxmgr.label "Execute JS Transaction Via Transaction Manager">
<!ENTITY executeJSTransactionViaEditor.label "Execute JS Transaction Via Editor">
<!ENTITY startLogCmd.label "Start Log">
<!ENTITY stopLogCmd.label "Stop Log">
<!ENTITY runLogCmd.label "Run Log">
<!ENTITY setFocusCmd.label "Set Focus">
<!-- Toolbar-only items -->
<!ENTITY menuBar.tooltip "Menu Bar">
<!ENTITY compositionToolbar.tooltip "Composition Toolbar">

Просмотреть файл

@ -567,3 +567,10 @@ function ExecuteJSTransactionViaEditor()
}
}
function EditorNewPlaintext()
{
window.openDialog( "chrome://debugqa/content/debugQATextEditorShell.xul",
"_blank",
"chrome,dialog=no,all",
"about:blank");
}

Просмотреть файл

@ -0,0 +1,142 @@
<?xml version="1.0"?>
<!-- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is Mozilla Communicator client code, released
- March 31, 1998.
-
- The Initial Developer of the Original Code is
- Netscape Communications Corporation.
- Portions created by the Initial Developer are Copyright (C) 1998-1999
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
- Blake Ross <blakeross@telocity.com>
- Peter Annema <disttsc@bart.nl>
- Jeremy M. Dolan <jmd@pobox.com>
- Mark Banner <bugzilla@standard8.demon.co.uk>
-
- Alternatively, the contents of this file may be used under the terms of
- either of the GNU General Public License Version 2 or later (the "GPL"),
- or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the GPL or the LGPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<!DOCTYPE overlay [
<!ENTITY % debugQAEditorOverlayDTD SYSTEM "chrome://debugqa/locale/debugQAEditorOverlay.dtd">
%debugQAEditorOverlayDTD;
<!ENTITY % editorOverlayDTD SYSTEM "chrome://editor/locale/editorOverlay.dtd">
%editorOverlayDTD;
]>
<overlay id="debugQAEditorOverlay"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/x-javascript"
src="chrome://debugQA/content/debugQAEditorOverlay.js"/>
<menubar id="main-menubar">
<menu id="debugMenu" label="&debugMenu.label;" insertbefore="menu_Help">
<menupopup>
<menuitem label="&newEditorTestPage.label;"
oncommand="window.openDialog('chrome://editor/content','_blank','chrome,all,dialog=no','chrome://debugqa/content/EditorInitPage.html')"/>
<menuitem label="&textEditorCmd.label;"
oncommand="EditorNewPlaintext();" />
<menuitem label="&outputTextCmd.label;"
oncommand="EditorGetText()"/>
<menuitem label="&outputHTMLCmd.label;"
oncommand="EditorGetHTML()"/>
<menuseparator />
<menuitem label="&pasteAsQuotationCmd.label;"
accesskey="&editpastequotation.accesskey;"
oncommand="goDoCommand('cmd_pasteQuote')"/>
<menuitem label="&editRewrapCmd.label;"
oncommand="try { GetCurrentEditor().rewrap(true); } catch (e) {}"/>
<menuitem label="&editStripQuotesCmd.label;"
oncommand="try { GetCurrentEditor().stripCites(); } catch (e) {}"/>
<menuitem label="&insertTextCmd.label;"
oncommand="EditorInsertText('All good things come to those who wait. ')"/>
<menuitem id="menu_checkLinks" observes="cmd_checkLinks"
label="&checkLinksCmd.label;"/>
<menuseparator />
<menu accesskey="&insertformmenu.accesskey;" id="insertFormMenu"
label="&insertFormMenu.label;">
<menupopup>
<menuitem accesskey="&insertform.accesskey;" command="cmd_form"
label="&insertFormCmd.label;"/>
<menuseparator/>
<menuitem accesskey="&insertinputtag.accesskey;"
command="cmd_inputtag" label="&insertInputTagCmd.label;"/>
<menuitem accesskey="&insertinputimage.accesskey;"
command="cmd_inputimage"
label="&insertInputImageCmd.label;"/>
<menuitem accesskey="&inserttextarea.accesskey;"
command="cmd_textarea" label="&insertTextAreaCmd.label;"/>
<menuitem accesskey="&insertselect.accesskey;" command="cmd_select"
label="&insertSelectCmd.label;"/>
<menuitem accesskey="&insertbutton.accesskey;"
command="cmd_button" label="&insertButtonCmd.label;"/>
<menuitem accesskey="&insertlabel.accesskey;" command="cmd_label"
label="&insertLabelCmd.label;"/>
<menuitem accesskey="&insertfieldset.accesskey;"
command="cmd_fieldset" label="&insertFieldSetCmd.label;"/>
<menuseparator/>
<menuitem accesskey="&insertisindex.accesskey;"
command="cmd_isindex" label="&insertIsIndexCmd.label;"/>
</menupopup>
</menu>
<menuitem label="&testSelectionCmd.label;"
oncommand="EditorTestSelection()"/>
<menuitem label="&testTableLayoutCmd.label;"
oncommand="EditorTestTableLayout()"/>
<menuitem label="&showEmbeddedCmd.label;"
oncommand="EditorShowEmbeddedObjects()"/>
<menuitem label="&dumpContentCmd.label;"
oncommand="EditorDumpContent()"/>
<menuitem label="&testDocumentCmd.label;"
oncommand="EditorTestDocument()"/>
<menuitem label="&runUnitTestsCmd.label;"
oncommand="EditorUnitTests()"/>
<menuseparator />
<menuitem label="&dumpUndoStack.label;"
oncommand="DumpUndoStack()"/>
<menuitem label="&dumpRedoStack.label;"
oncommand="DumpRedoStack()"/>
<menuitem label="&executeJSTransactionViaTxmgr.label;"
oncommand="ExecuteJSTransactionViaTxmgr()"/>
<menuitem label="&executeJSTransactionViaEditor.label;"
oncommand="ExecuteJSTransactionViaEditor()"/>
<menuseparator />
<menuitem label="&startLogCmd.label;"
oncommand="EditorStartLog()"/>
<menuitem label="&stopLogCmd.label;"
oncommand="EditorStopLog()"/>
<menuitem label="&runLogCmd.label;"
oncommand="EditorRunLog()"/>
<menuseparator />
<menuitem label="&setFocusCmd.label;"
accesskey="&toolsetfocus.accesskey;"
oncommand="window.focus()"/>
</menupopup>
</menu>
</menubar>
</overlay>

Просмотреть файл

@ -167,7 +167,7 @@
<menuitem label="chofmann's Browser Buster"
oncommand="openTopWin('http://webtools.mozilla.org/buster/');"/>
<menuitem label="Composer (with test page)"
oncommand="window.openDialog('chrome://editor/content','_blank','chrome,all,dialog=no','chrome://editor/content/EditorInitPage.html')"/>
oncommand="window.openDialog('chrome://editor/content/','_blank','chrome,all,dialog=no','chrome://debugqa/content/EditorInitPage.html')"/>
<menuitem label="Flush Memory"
oncommand="Components.classes['@mozilla.org/xpcom/memory-service;1'].getService(Components.interfaces.nsIMemory).heapMinimize(true);"/>
<menuitem label="Show Build Configuration"

Просмотреть файл

@ -49,8 +49,14 @@
<?xul-overlay href="chrome://communicator/content/tasksOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/contentAreaContextOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/sidebar/sidebarOverlay.xul"?>
<?xul-overlay href="chrome://debugQA/content/debugQAEditorOverlay.xul"?>
<!DOCTYPE window SYSTEM "chrome://editor/locale/editor.dtd">
<!DOCTYPE window [
<!ENTITY % debugQAEditorOverlayDTD SYSTEM "chrome://debugqa/locale/debugQAEditorOverlay.dtd">
%debugQAEditorOverlayDTD;
<!ENTITY % editorDTD SYSTEM "chrome://editor/locale/editor.dtd">
%editorDTD;
]>
<!-- NOTE: If we don't have "title" set, text editor doesn't work! -->
<window id="main-window"
@ -71,7 +77,6 @@
<script type="application/x-javascript" src="chrome://editor/content/editor.js"/>
<script type="application/x-javascript" src="chrome://editor/content/ComposerCommands.js"/>
<script type="application/x-javascript" src="chrome://editor/content/EditorCommandsDebug.js"/>
<script type="application/x-javascript" src="chrome://global/content/nsDragAndDrop.js"/>
<script type="application/x-javascript" src="chrome://communicator/content/contentAreaDD.js"/>
<!--
@ -90,7 +95,7 @@ editor.xul has these - do we need them?
<commandset id="composerMenuItems"/>
</commands>
<broadcaster id="args" value="chrome://editor/content/EditorInitPagePlain.html"/>
<broadcaster id="args" value="chrome://debugqa/content/EditorInitPagePlain.html"/>
<broadcaster id="canPrint"/>
<!-- Interim hack to transition from nsIXULWindowCallbacks/ShowWindowWithArgs
@ -125,10 +130,6 @@ editor.xul has these - do we need them?
<!-- tasks menu filled from tasksOverlay -->
<menu accesskey="t" id="tasksMenu"/>
<!-- DEBUG only -->
<menu id="debugMenu" />
<!-- end DEBUG only -->
<!-- help menu filled from globalOverlay -->
<menu accesskey="h" id="menu_Help"/>

Просмотреть файл

@ -1,12 +1,18 @@
debugqa.jar:
% content debugqa %content/debugqa/ xpcnativewrappers=yes
% overlay chrome://navigator/content/navigatorOverlay.xul chrome://debugqa/content/debugQAMenuOverlay.xul
% overlay chrome://editor/content/editor.xul chrome://debugqa/content/debugQAEditorOverlay.xul
% overlay chrome://navigator/content/navigator.xul chrome://debugqa/content/debugQANavigatorOverlay.xul
% overlay chrome://communicator/content/pref/preftree.xul chrome://debugqa/content/debugQAPrefsOverlay.xul
content/debugqa/debugQAEditorOverlay.js (content/debugQAEditorOverlay.js)
content/debugqa/debugQAEditorOverlay.xul (content/debugQAEditorOverlay.xul)
content/debugqa/debugQAMenuOverlay.js (content/debugQAMenuOverlay.js)
content/debugqa/debugQAMenuOverlay.xul (content/debugQAMenuOverlay.xul)
content/debugqa/debugQANavigatorOverlay.xul (content/debugQANavigatorOverlay.xul)
content/debugqa/debugQAPrefsOverlay.xul (content/debugQAPrefsOverlay.xul)
content/debugqa/debugQATextEditorShell.xul (content/debugQATextEditorShell.xul)
content/debugqa/EditorInitPage.html (content/EditorInitPage.html)
content/debugqa/EditorInitPagePlain.html (content/EditorInitPagePlain.html)
content/debugqa/pref-debug.xul (content/pref-debug.xul)
content/debugqa/pref-debug1.xul (content/pref-debug1.xul)
content/debugqa/pref-debug2.xul (content/pref-debug2.xul)

Просмотреть файл

@ -0,0 +1,24 @@
<!-- Debug menu items -->
<!ENTITY debugMenu.label "Debug">
<!ENTITY newEditorTestPage.label "Composer with Test Page">
<!ENTITY textEditorCmd.label "Plaintext Editor">
<!ENTITY outputTextCmd.label "Output Text">
<!ENTITY outputHTMLCmd.label "Output HTML">
<!ENTITY insertTextCmd.label "Insert Text">
<!ENTITY testSelectionCmd.label "Test Selection">
<!ENTITY testTableLayoutCmd.label "Test Table Layout">
<!ENTITY testDocumentCmd.label "Test Document">
<!ENTITY showEmbeddedCmd.label "Show Embedded Objects">
<!ENTITY dumpContentCmd.label "Dump Content Tree">
<!ENTITY runUnitTestsCmd.label "Run Unit Tests">
<!ENTITY dumpUndoStack.label "Dump Undo Stack">
<!ENTITY dumpRedoStack.label "Dump Redo Stack">
<!ENTITY executeJSTransactionViaTxmgr.label "Execute JS Transaction Via Transaction Manager">
<!ENTITY executeJSTransactionViaEditor.label "Execute JS Transaction Via Editor">
<!ENTITY startLogCmd.label "Start Log">
<!ENTITY stopLogCmd.label "Stop Log">
<!ENTITY runLogCmd.label "Run Log">
<!ENTITY setFocusCmd.label "Set Focus">
<!-- Text editor values -->
<!ENTITY textEditorWindow.titlemodifier "Text Editor">

Просмотреть файл

@ -2,6 +2,7 @@
debugqa.jar:
% locale debugQA @AB_CD@ %locale/@AB_CD@/debugQA/
locale/@AB_CD@/debugQA/debugQAEditorOverlay.dtd (%debugQAEditorOverlay.dtd)
locale/@AB_CD@/debugQA/debugQANavigatorOverlay.properties (%debugQANavigatorOverlay.properties)
locale/@AB_CD@/debugQA/debugQAPrefsOverlay.dtd (%debugQAPrefsOverlay.dtd)
locale/@AB_CD@/debugQA/pref-debug.dtd (%pref-debug.dtd)