Extension Points

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

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.

Toolbar Buttons

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.

Context Menu Providers

base interface: Gregor.WebEdit.IContextMenuProvider,
                - or -
                Gregor.WebEdit.IContextMenuProvider2 (recommended)
instantiation:  at startup
registration:   append to CMP collection, through
                WebEditApp.MainForm.ContextMenuProviders

Auto Complete Providers

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.

Token Lists

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).

Syntax Providers

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

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

Auto Converters

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

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

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

Format Theme Providers

base class:    Gregor.WebEdit.Editing.CFormatThemeProviderBase
instantiation: at startup
registration:  append to format theme providers collection,
               WebEditApp.EditManager.FormatThemeProviders

Style Sets

class:         Gregor.UICore.CStyleSet
instantiation: at startup
registration:  append to style sets collection, through
               Gregor.UICore.NStyleSets.Instance

Tool Windows

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.

Settings Dialog Pages

base class:    Gregor.AppCore.Settings.CSettingBase (or more specific)
instantiation: at startup
registration:  add to a suitable setting group,
               see WebEditApp.ConfigManager.SettingManager

Command Managers and Protocols

See below (document storage providers).

Document Storage Providers

See Document Storage Providers.

Document View Providers

[to be supplied]


See Also: Document Storage Providers | WebEdit.NET API | AddIns