|SDL Plug-in Framework Overview|
This help system describes the SDL Plug-in Framework. This framework offers plug-in functionality to applications and components. Application developers can define extension points and dynamically load any plug-ins providing extensions targeting these extension points using the plug-in framework.
The version of the Plug-in Framework documented here is the one that was released with SDL Trados Studio 2014.
The following are the design goals of the plug-in framework:
This section introduces a number of concepts and definitions that are central to the plug-in framework.
This is the application (or component) which provides plug-in capabilities. The hosting application will define certain extension points and will use the plug-in framework to discover and load plug-ins and extensions for these extension points.
An extension point is a point in the application or component that allows adding extensions to it. An extension point is defined by a .Net attribute, called an extension attribute. All extension attributes should derive from the ExtensionAttribute base class.
An extension is a single piece of functionality that adds functionality to an application or component through a specific extension point. An extension is defined by a .Net class, defined in a plug-in assembly, annotated with the extension attribute that identifies the extension point it targets. An extension class typically implements an interface that is required by the extension point it is targeting.
A plug-in can contain one or more extensions. A plug-in consist is a .Net assembly which is annotated with the assembly-level PluginAttribute, which has a Name property that contains the friendly name of the plug-in. The presence of this attribute tells the framework that this is a plug-in assembly.
The central object in the plug-in framework is the plug-in registry (IPluginRegistry). The plug-in registry provides functionality to the host application to detect which plug-ins and extensions are available and create instances of the extensions provided by these plug-ins.
A plug-in manifest is an XML file, which contains serialized meta data about a plug-in assembly, it contains:
At compile time, the plug-in manifest generator creates a plug-in manifest for every plug-in assembly. The plug-in manifest generator is implemented as an MSBuild task, which runs as part of the standard Visual Studio build. The plug-in manifest generator reflects over the plug-in assembly and creates the plug-in manifest plus any additional resource files containing resources needed by the manifest (see Plug-in Resources and Localizability)). The plug-in registry loads plug-in information from one or more plug-in manifest files.