Extensibility Extension Points in C#
Introduction
Extension points allow you to hook functionality into various areas of the Studio Pro IDE. ExtensionPoint is a base class that extension developers can inherit from. Once inherited, your functionality will be loaded by Studio Pro. These classes all have the *Extension suffix, inherit from the ExtensionBase base class, and contain a few virtual or abstract members.
ExtensionPoint is the only way you can add a custom behavior to Studio Pro. All other APIs provided solely to support the implementation or expression of these behaviors.
To be injected, your class must be decorated with ExportAttribute as shown in the example above. This attribute is part of the Managed Extensibility Framework that is used by Studio Pro.
List of Available Extension Points
Studio Pro UI Extensions
-
ContextMenuExtension – allows injecting new context menu items into model elements
-
MenuExtension – allows injecting new menu items into Studio Pro menu bar
-
DockablePaneExtension – allows introducing new dockable panes like Connector or Documentation; panes integrate with Studio Pro layout system automatically
It is advised to introduce a new View menu item for each pane so Studio Pro users have a way to open it.
There are additional features that provide access to the following:
- Studio Pro configuration
- The currently opened app, as well as event subscription mechanism to that app
- Events can be subscribed to by using the subscribe and unsubscribe methods exposed in UIExtensionBase.
Studio Pro and MxBuild Extensions
- ConsistencyCheckExtension – allows injecting custom logic into the Consistency check process