Extension points define areas of WebEdit.NET funcionality that are particularly suited for extensibility. Typically, an extension is an object that can be activated by appending it to a collection provided by WebEdit.NET. The object's class must implement a particular interface or derive from a specific base class. Often, the class will directly or indirectly support the Gregor.Core.IProvider interface.
Here's how to read the information in the boxes: Class means you need to create an instance of that class. Base class means you have to derive from that class. Base interface means that interface needs to be supported. Instantiation means creating an extension object. Registration means appending such an object to some collection of like extension objects for later activation. Activation means actually using such an object. Configuration means the user specifies the use of an extension in some configuration file.
Actions are the basis for menu items and toolbar buttons.
class: Gregor.UICore.CAction (use event handling)
instantiation: at startup
registration: append to action list,
through WebEditApp.ActionManager.ActionList
If an icon is used, add it to WebEditApp.ImageList, and set the icon key on the action.
class: Gregor.UICore.Controls.CActionBarItem (hook to an action)
- or -
Gregor.UICore.Controls.CSimpleBarItem (set a command as the UserString)
instantiation: at startup
registration: append to one of the two toolbars,
through WebEditApp.MainForm.MainToolbar, then
ToolbarFirst.BarItems or ToolbarSecond.BarItems
Note that WebEdit.NET serializes button information, so allow for this.
base interface: Gregor.WebEdit.IContextMenuProvider,
- or -
Gregor.WebEdit.IContextMenuProvider2 (recommended)
instantiation: at startup
registration: append to CMP collection, through
WebEditApp.MainForm.ContextMenuProviders
These are used as data source for Shell auto-completion in the Find/Replace window or the parameter dialog.
base interface: Gregor.WinShell.IRecordingAutoCompleteProvider
instantiation: at startup
registration: append to ACP collection, through
WebEditApp.TokenManager.AutoCompleteProviders
Note: as of now, there is no way to make WebEdit use different providers for auto-completion.
class: Gregor.Editing.General.CTokenList (set ApplicationDefined:=True)
instantiation: when needed
registration: append to token list collection,
through WebEditApp.TokenManager.AllTokenLists
Usage of token lists may be also be configured in the languages configuration file (WebEditLanguages.xml).
These provide the programming language syntax for the assembly browser.
interface: Gregor.Core.ISyntaxProvider instantiation: when needed activation: assign to WebEditApp.MainForm.AssemblyBrowserForm.LanguageProvider
Syntax providers are also used for building Script AddIns (along with system code DOM providers). For this use, both syntax and code DOM providers they must be configured in the language configuration file.
Code Assistants provide code generation functionality, which is accessibly through the context menu on items like interfaces or virtual methods shown in the assembly browser tool window.
class: Gregor.Editing.EditAssistance.CCodeAssistantBase configuration: languages configuration file (WebEditLanguages.xml) instantiation: automatically registration: ditto activation: when selecting a code assistance context menu command
These are objects that assist in text editing, automagically changing edited lines, or appending "end constructs".
class: Gregor.Editing.AutoConversion.CAutoConverterBase configuration: languages configuration file (WebEditLanguages.xml) instantiation: automatically registration: ditto activation: on language selection
Syntax parsers are used for syntax highlighting.
base classes: Gregor.Editing.Coloring.CSyntaxParserBase (or more specific parser base) configuration: languages configuration file (WebEditLanguages.xml) instantiation: automatically registration: ditto activation: on language selection
Alternatively, a syntax parser may be created and registered in code, so the user can choose it explicitly. This requires creating a new language info object (Gregor.Core.CLanguageInfo), and configuring it appropriately.
Outline providers provide the contents of the Outline tool window, which display a hierarchical structure of the current document.
base class: Gregor.Editing.Outlining.COutlineProviderBase configuration: languages configuration file (WebEditLanguages.xml) instantiation: automatically registration: ditto activation: on language selection
base class: Gregor.WebEdit.Editing.CFormatThemeProviderBase
instantiation: at startup
registration: append to format theme providers collection,
WebEditApp.EditManager.FormatThemeProviders
class: Gregor.UICore.CStyleSet
instantiation: at startup
registration: append to style sets collection, through
Gregor.UICore.NStyleSets.Instance
class: Gregor.UICore.Docking.CToolWindowRestore
instantiation: at startup
registration: add to TWR collection of UICore's dock manager,
WebEditApp.MainForm.DockManager.ToolWindowRestores
Tool windows are typically shown by calling the ShowToolWindow method of the dock manager.
base class: Gregor.AppCore.Settings.CSettingBase (or more specific)
instantiation: at startup
registration: add to a suitable setting group,
see WebEditApp.ConfigManager.SettingManager
See below (document storage providers).
See Document Storage Providers.
[to be supplied]
See Also: Document Storage Providers | WebEdit.NET API | AddIns