Package Editra :: Package src :: Module plugin
[hide private]

Module plugin

source code

This module provides the core functionality of the plugin system for Editra. Its design is influenced by the system used in the web based project management software Trac (trac.edgewall.org). To create a plugin plugin class must derive from Plugin and in the class definintion it must state which Interface it Implements. Interfaces are defined throughout various locations in the core Editra code. The interface defines the contract that the plugin needs to conform to.

Plugins consist of python egg files that can be created with the use of the setuptools package.

There are some issues I dont like with how this is currently working that I hope to find a work around for in later revisions. Namely I dont like the fact that the plugins are loaded and kept in memory even when they are not activated. Although the footprint of the non activated plugin class members being held in memory is not likely to be very large.


Author: Cody Precord <cprecord@editra.org>

Classes [hide private]
  Interface
Base class for defining interfaces.
  ExtensionPoint
Declares what Interface a plugin is extending
  PluginMeta
Acts as the registration point for plugin entrypoint objects.
  Plugin
Base class for all plugin type objects
  PluginConfigObject
Plugin configuration object.
  PluginData
A storage class for representing data about a Plugin
  PluginManager
The PluginManger keeps track of the active plugins.
Functions [hide private]
 
Implements(*interfaces)
Used by Plugins to declare the interface that they implment/extend.
source code
Variables [hide private]
  __svnid__ = '$Id: plugin.py 59902 2009-03-28 16:21:50Z CJP $'
  __revision__ = '$Revision: 59902 $'
  ENTRYPOINT = 'Editra.plugins'
  PLUGIN_CONFIG = 'plugin.cfg'
  _implements = []
Function Details [hide private]

Implements(*interfaces)

source code 

Used by Plugins to declare the interface that they implment/extend.

Parameters:
  • interfaces - list of interfaces the plugin implements