#NEWLINE# def register( self , manifest ) : #NEWLINE# #INDENT# ' Register a plugin with the workbench.\n\n        Parameters\n        ----------\n        manifest : PluginManifest\n            The plugin manifest to register with the workbench.\n\n        ' #NEWLINE# plugin_id = manifest . id #NEWLINE# if ( plugin_id in self . _manifests ) : #NEWLINE# #INDENT# msg = "plugin '%s' is already registered" #NEWLINE# raise ValueError ( ( msg % plugin_id ) ) #NEWLINE# #UNINDENT# self . _manifests [ plugin_id ] = manifest #NEWLINE# manifest . workbench = self #NEWLINE# self . _add_extensions ( manifest . extensions ) #NEWLINE# self . _add_extension_points ( manifest . extension_points ) #NEWLINE# self . plugin_added ( plugin_id )