Child pages
  • Plugin Loader
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

PluginLoader is a facility for loading the Plugin DLLs that constitute the Omea application, both stock and third-party.
Objectives:

  • (EXP) Enable running experimental Omea versions on different core binaries, plugins, and database without touching the primary installation.
  • (LDC) Use Load context for the core plugins instead of LoadFrom, which enables the use of GAC or NGen.
  • (PUP) Per-user plugins should still be supported.

Basics. PluginLoader should look for assembly files under the Plugin Locations and, in case the file matches the Plugin Files Mask, load the assembly and look for classes implementing the IPlugin interface, wwhich are the plugins.

Plugin Locations. There are several folders to be checked for the plugins (marked with "(lightbulb)"). The "[/*]" suffix on some of the location paths means that plugin files may be placed into a subfolder, up to one level deep under the main folder, if the plugin consists of multiple files and they're worth separating from the other plugins.

  • Primary Plugins.
    • (lightbulb) (P.JB) Omea Binaries folder. Loaded from the Omea Binaries folder, side-by-side with the entry executable.
      • Each DLL that matches the Plugin Files Mask is loaded by its assembly name, which must correspond to the file name, but for file extension. This provides for the Load context and enables the GAC/NGen functionality.
      • If the DLL is not a primary Omea plugin, an error is raised.
        • A primary Omea plugin must have the same strong name key as the plugin loader assembly.
      • If the DLL could not be loaded by its name (assembly name does not agree with the file name), an error is raised.
  • Third-party Plugins.
    • Per-machine plugins.
      • (lightbulb) (P.OB) Plugins folder under the Omea Binaries folder.
        • Plugin Files Mask applies.
        • File Name must agree to the assembly name, as the Load context will, possibly, be applied to these plugins as well.
      • (lightbulb) (P.AU) <AllUsersAppData>/JetBrains/Omea/Plugins[/*] folder.
        • Plugin Files Mask applies.
        • LoadFrom context is used.
    • Per-user plugins.
      • (lightbulb) (P.RA) <RoamingAppData>/JetBrains/Omea/Plugins[/*] folder.
        • Plugin Files Mask applies.
        • LoadFrom context is used.
      • (lightbulb) (P.LA) <LocalAppData>/JetBrains/Omea/Plugins[/*] folder.
        • Plugin Files Mask applies.
        • LoadFrom context is used.
      • (lightbulb) (P.DB) <OmeaDatabaseFolder>/Plugins[/*] folder.
        • Applies to Omea instances running the given database only.
        • Plugin Files Mask applies.
        • LoadFrom context is used.

Plugin locations should be checked in the following order (primary plugins are preferred, then user's overrides go, then machine plugins):

  1. (P.JB)
  2. (P.DB)
  3. (P.LU)
  4. (P.RU)
  5. (P.AU)
  6. (P.OB)

(P.JB) implement (LDC).
As the plugins are not stored in the Registry, but read from the Binaries folder automatically, be it a compiled debug or installed release version, (P.JB) and (P.IB) implement (EXP). (P.DB) allows to switch plugin sets with the command-line.
(P.DB), (P.LU), and (P.RU) implement (PUP).

Plugin Files Mask. Not all the files in the Plugin Locations are subject to loading by Omea. To avoid loading excessive numbers of managed DLLs or native DLLs, the following regex filter should be applied to the files:

  • No labels