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 the AbstractContributionFactory
as this class provides a
default constructor.
Clients must be aware that the results of getLocation()
and
getNamespace()
will not be valid until
setInitializationData(IConfigurationElement, String, Object)
is
invoked. This will occur before
AbstractContributionFactory.createContributionItems(org.eclipse.ui.services.IServiceLocator, IContributionRoot)
is invoked.
Constructor and Description |
---|
ExtensionContributionFactory()
Create an instance of this class.
|
Modifier and Type | Method and 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 own
IExecutableExtension
behaviour must invoke this method prior to any
customization they perform. |
createContributionItems
public ExtensionContributionFactory()
public final String getLocation()
AbstractContributionFactory
getLocation
in class AbstractContributionFactory
null
.public final String getNamespace()
AbstractContributionFactory
getNamespace
in class AbstractContributionFactory
public void setInitializationData(IConfigurationElement config, String propertyName, Object data) throws CoreException
IExecutableExtension
behaviour must invoke this method prior to any
customization they perform.setInitializationData
in interface IExecutableExtension
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 the createExecutableExtension(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 a String
,
a Hashtable
, or null
.CoreException
- so that a subclass may throw thisIConfigurationElement.createExecutableExtension(String)
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.