Skip to content

Addin ExtensionPoints

DamianSuess edited this page Dec 18, 2018 · 9 revisions

This project heavily relies on Mono.Addins to extend the system.

List of ExtensionPoints

ExtensionPoint Status Description
/ToolsHub/OnStartup active Called when ToolsHub is starting up but not yet fully initialized.
/ToolsHub/SystemTray active Used to add icons to the ToolsHub's notification icon in the System Tray.
/ToolsHub/Utility active After system is loaded, execute add-on utility or service

OnStartup Add-ins

This ExtensionPoint is executed immediately upon startup of the ToolsHub app before anything else. Literally, not even the SysTray or Sidebar.

The OnStartup ExtensionPoint and OnStartupAddin ExtensionNode are defined by ToolsHub.addin.xml inside of the main project.

Defining the Extension Node:

  <ExtensionPoint path="/ToolsHub/OnStartup">
    <ExtensionNode name="OnStartupAddin" objectType="Xeno.ToolsHub.ExtensionModel.IOnStartupExtension" />
  </ExtensionPoint>

Calling your add-in:

  <Extension path="/ToolsHub/OnStartup">
    <OnStartupAddin type="Xeno.ToolsHub.LocalAddins.StartupAddins.SampleStartupAddin" />
  </Extension>

Utility Add-ins

The /ToolsHub/Utility ExtensionPoint is called after the ToolsHub app has been started and fully initialized.

UtilityAddin references AbstractAddin which is garbage collected via IDisposable. You can override the Dispose(bool disposing) method and have access to the property, (bool) IsDisposing

XML Manifest Definition

  <ExtensionPoint path="/ToolsHub/Utility">
    <ExtensionNode name="UtilityAddin" objectType="Xeno.ToolsHub.ExtensionModel.UtilityAddin" />
  </ExtensionPoint>

Calling your add-in:

  <Extension path="/ToolsHub/Utility">
    <UtilityAddin type="Xeno.ToolsHub.LocalAddins.UtilityAddins.SampleUtilityAddin" />
  </Extension>

Categories

This helps categorize what type of add-ins are available on the Preferences and installer pages.

Name Description
Tools Application tool add-in
Sample Example project add-in