Extensible Plugin Provider Component

From user's Wiki!
Jump to: navigation, search

This functionality of the Kernel allows adding new Plugin providers with specific plugin specifications. The plugin provider is the responsible for providing plugins: scans new plugins and loads the selected ones.

There are two main plugin providers available in the framework:

  • GIMIAS front-end plugin provider: Scans and loads GIMIAS plugins. This is the native plugin of GIMIAS and can extend the framework using all available features
  • Command line plugin provider: Scans and loads command line plugins that provide new processing functionalities

New plugin providers allow to scan new plugins based on other kind of strategies, like for example SOA, or scan plugins that are located remotely.

The user select the folders that will be scanned for plugins when starting GIMIAS. This window is available in Menu Edit->Preferences.

GIMIAS front-end plugin provider

GIMIAS front-end plugin provider scans all available plugins in the plugins folder. The plugin name will be read from the plugin.xml file and only the configured plugins will be loaded.

This is an example of plugin.xml file:

<?xml version="1.0" ?>
<plugin name="VMTKPlugin">
    <depends>
	<plugin name="MITKPlugin" />
    </depends>
</plugin>

If no plugin.xml is found in the plugin folder, a generic name "plugin1" will appear on the selection list. In order to copy the plugin.xml from source to destination, you need to click "Install files to build folder" of CSnake tool.

Configure a Plugin provider

You can add more plugin providers instances if you go to Preferences->Plugin configuration. For example, to add a new instance of command line plugin provider, you need to click the button "Import new plugins" and set these parameters:

Plugin providers configuration
Plugin providers configuration for 3D Slicer 4.0

The configuration of the plugin provider will be stored in the properties of the PluginProvider, under the tag name "Configuration".

Selected plugins

The selected plugins will be saved independently for each plugin provider because two plugin providers can use the same plugin name. The configuration of the selected plugins will be stored in the properties of the PluginProvider, under the tag name "Plugins".


UML class diagram and source code

You can read more details in GmKernel#Plugin_Provider and see example implementations in SSH Plugin.

Go back to GIMIAS Architecture