g-Eclipse
Release 1.0.0

eu.geclipse.core
Class ExtensionManager

java.lang.Object
  extended by eu.geclipse.core.ExtensionManager

public class ExtensionManager
extends java.lang.Object

This class provides some helper methods to easily access extension points, related configuration elements and executable extensions.


Constructor Summary
ExtensionManager()
          Construct a new ExtensionManager that uses the default extension registry.
ExtensionManager(IExtensionRegistry registry)
          Construct a new ExtensionManager that uses the specified extension registry to look up the extensions.
 
Method Summary
 java.util.List<IConfigurationElement> getConfigurationElements(java.lang.String extensionPointID, java.lang.String configurationElementName)
          Get a list of all configuration elements with the specified name that are available for the specified extension point.
 java.util.List<java.lang.Object> getExecutableExtensions(java.lang.String extensionPointID, java.lang.String configurationElementName, java.lang.String propertyName)
          Get a list of all executable extension with the specified property name for the specified configuration element and the specified extension point.
 IExtensionPoint getExtensionPoint(java.lang.String extensionPointID)
          Get the extension point with the specified id.
 java.util.List<IExtension> getExtensions(java.lang.String extensionPointID)
          Get a list of all currently available extensions for the specified extension point.
 IExtensionRegistry getRegistry()
          Get the extension registry that is used by this extension manager to look up extensions.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtensionManager

public ExtensionManager()
Construct a new ExtensionManager that uses the default extension registry.


ExtensionManager

public ExtensionManager(IExtensionRegistry registry)
Construct a new ExtensionManager that uses the specified extension registry to look up the extensions.

Parameters:
registry - The IExtensionRegistry used to look up extensions.
Method Detail

getRegistry

public IExtensionRegistry getRegistry()
Get the extension registry that is used by this extension manager to look up extensions.

Returns:
The IExtensionRegistry used to look up extensions.

getExtensionPoint

public IExtensionPoint getExtensionPoint(java.lang.String extensionPointID)
Get the extension point with the specified id.

Parameters:
extensionPointID - The id of the extension point.
Returns:
The extension point with the specified id or null.

getExtensions

public java.util.List<IExtension> getExtensions(java.lang.String extensionPointID)
Get a list of all currently available extensions for the specified extension point.

Parameters:
extensionPointID - The ID of the extension point.
Returns:
A list of all currently registered extensions of the specified extension point.

getConfigurationElements

public java.util.List<IConfigurationElement> getConfigurationElements(java.lang.String extensionPointID,
                                                                      java.lang.String configurationElementName)
Get a list of all configuration elements with the specified name that are available for the specified extension point.

Parameters:
extensionPointID - The ID of the extension point.
configurationElementName - The name of the configuration element.
Returns:
A list of all IConfigurationElements with the specified name that could be found for the specified extension point.

getExecutableExtensions

public java.util.List<java.lang.Object> getExecutableExtensions(java.lang.String extensionPointID,
                                                                java.lang.String configurationElementName,
                                                                java.lang.String propertyName)
Get a list of all executable extension with the specified property name for the specified configuration element and the specified extension point.

Parameters:
extensionPointID - The ID of the extension point.
configurationElementName - The name of the configuration element.
propertyName - The property name that denotes the executable extension.
Returns:
A list of instances of the executable extension that could be found for the specified parameters.

g-Eclipse
Release 1.0.0