66345: Factoring necessary for editor reorganization. sr=kin/sfraser, r=jfrancis

git-svn-id: svn://10.0.0.236/trunk@91511 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
akkana%netscape.com
2001-04-05 23:48:01 +00:00
parent 021d1cf3d4
commit 02dbe54c0d
51 changed files with 2433 additions and 2593 deletions

View File

@@ -23,23 +23,33 @@
#include "nsIGenericFactory.h"
#include "nsEditorCID.h"
#include "nsEditorShell.h" // for the CID
#include "nsEditor.h" // for gInstanceCount
#include "nsEditorController.h" //CID
#include "nsEditorService.h"
#include "nsHTMLEditor.h"
#include "nsPlaintextEditor.h"
#include "nsEditorController.h" //CID
#define DO_COMPOSER_TOO 1
#ifdef DO_COMPOSER_TOO
#include "nsComposerController.h" //CID
#include "nsEditorShell.h" // for the CID
#endif /* DO_COMPOSER_TOO */
////////////////////////////////////////////////////////////////////////
// Define the contructor function for the objects
//
// NOTE: This creates an instance of objects by using the default constructor
//
NS_GENERIC_FACTORY_CONSTRUCTOR(nsEditorShell)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsEditorController)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsComposerController)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsEditorService)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsPlaintextEditor)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsEditorController)
#ifdef DO_COMPOSER_TOO
NS_GENERIC_FACTORY_CONSTRUCTOR(nsComposerController)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsEditorShell)
#endif /* DO_COMPOSER_TOO */
#ifdef ENABLE_EDITOR_API_LOG
#include "nsHTMLEditorLog.h"
@@ -63,14 +73,6 @@ static nsModuleComponentInfo components[] = {
{ "HTML Editor", NS_HTMLEDITOR_CID,
"@mozilla.org/editor/htmleditor;1", nsHTMLEditorConstructor, },
#endif
{ "Editor Controller", NS_EDITORCONTROLLER_CID,
"@mozilla.org/editor/editorcontroller;1", nsEditorControllerConstructor, },
{ "Composer Controller", NS_COMPOSERCONTROLLER_CID,
"@mozilla.org/editor/composercontroller;1", nsComposerControllerConstructor, },
{ "Editor Shell Component", NS_EDITORSHELL_CID,
"@mozilla.org/editor/editorshell;1", nsEditorShellConstructor, },
{ "Editor Shell Spell Checker", NS_EDITORSHELL_CID,
"@mozilla.org/editor/editorspellcheck;1", nsEditorShellConstructor, },
{ "Editor Service", NS_EDITORSERVICE_CID,
"@mozilla.org/editor/editorservice;1", nsEditorServiceConstructor,},
{ "Editor Startup Handler", NS_EDITORSERVICE_CID,
@@ -81,6 +83,18 @@ static nsModuleComponentInfo components[] = {
{ "Edit Startup Handler", NS_EDITORSERVICE_CID,
"@mozilla.org/commandlinehandler/general-startup;1?type=edit",
nsEditorServiceConstructor, },
{ "Editor Controller", NS_EDITORCONTROLLER_CID,
"@mozilla.org/editor/editorcontroller;1",
nsEditorControllerConstructor, },
#ifdef DO_COMPOSER_TOO
{ "Composer Controller", NS_COMPOSERCONTROLLER_CID,
"@mozilla.org/editor/composercontroller;1",
nsComposerControllerConstructor, },
{ "Editor Shell Component", NS_EDITORSHELL_CID,
"@mozilla.org/editor/editorshell;1", nsEditorShellConstructor, },
{ "Editor Shell Spell Checker", NS_EDITORSHELL_CID,
"@mozilla.org/editor/editorspellcheck;1", nsEditorShellConstructor, },
#endif /* DO_COMPOSER_TOO */
};
////////////////////////////////////////////////////////////////////////