Package org.eclipse.ui.menus
Class ExtensionContributionFactory
- java.lang.Object
-
- org.eclipse.ui.menus.AbstractContributionFactory
-
- org.eclipse.ui.menus.ExtensionContributionFactory
-
- All Implemented Interfaces:
IExecutableExtension
public abstract class ExtensionContributionFactory extends AbstractContributionFactory implements IExecutableExtension
Clients who wish to contribute factories via the
org.eclipse.ui.menus
extension point should subclass this class rather than theAbstractContributionFactory
as this class provides a default constructor.Clients must be aware that the results of
getLocation()
andgetNamespace()
will not be valid untilsetInitializationData(IConfigurationElement, String, Object)
is invoked. This will occur beforeAbstractContributionFactory.createContributionItems(org.eclipse.ui.services.IServiceLocator, IContributionRoot)
is invoked.- Since:
- 3.5
-
-
Constructor Summary
Constructors Constructor Description ExtensionContributionFactory()
Create an instance of this class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getLocation()
Return the location as a String.String
getNamespace()
Return the namespace for this cache.void
setInitializationData(IConfigurationElement config, String propertyName, Object data)
Clients who wish to implement their ownIExecutableExtension
behaviour must invoke this method prior to any customization they perform.-
Methods inherited from class org.eclipse.ui.menus.AbstractContributionFactory
createContributionItems
-
-
-
-
Method Detail
-
getLocation
public final String getLocation()
Description copied from class:AbstractContributionFactory
Return the location as a String.- Overrides:
getLocation
in classAbstractContributionFactory
- Returns:
- the location - never
null
.
-
getNamespace
public final String getNamespace()
Description copied from class:AbstractContributionFactory
Return the namespace for this cache. This corresponds to the plug-in that is contributing this factory.- Overrides:
getNamespace
in classAbstractContributionFactory
- Returns:
- the namespace the namespace of this factory
-
setInitializationData
public void setInitializationData(IConfigurationElement config, String propertyName, Object data) throws CoreException
Clients who wish to implement their ownIExecutableExtension
behaviour must invoke this method prior to any customization they perform.- Specified by:
setInitializationData
in interfaceIExecutableExtension
- Parameters:
config
- the configuration element used to trigger this execution. It can be queried by the executable extension for specific configuration propertiespropertyName
- the name of an attribute of the configuration element used on thecreateExecutableExtension(String)
call. This argument can be used in the cases where a single configuration element is used to define multiple executable extensions.data
- adapter data in the form of aString
, aHashtable
, ornull
.- Throws:
CoreException
- so that a subclass may throw this- See Also:
IConfigurationElement.createExecutableExtension(String)
-
-