Class PluginClassDescriptor<T>
java.lang.Object
org.eclipse.emf.compare.rcp.extension.PluginClassDescriptor<T>
- Type Parameters:
T
- Type of the instances created from this descriptor.
- Direct Known Subclasses:
EqualityHelperExtensionProviderDescriptorRCPImpl
,PostProcessorDescriptor
,WeightProviderDescriptorRCPImpl
Simple utility class to create proxy of extension that are
instantiable
.
No test of the validity
of the wrapped
IConfigurationElement
is performed. As such you should always extend this class while listening to
the IExtensionRegistry
and react properly the removal of the wrapped
IConfigurationElement
.
Note: this is based on org.eclipse.emf.ecore.plugin.RegistryReader.PluginClassDescriptor
-
Field Summary
Modifier and TypeFieldDescriptionprotected String
The name of the attribute that holds the class full name to be instantiated.protected org.eclipse.core.runtime.IConfigurationElement
The element from which create an instance. -
Constructor Summary
ConstructorDescriptionPluginClassDescriptor
(org.eclipse.core.runtime.IConfigurationElement element, String attributeName) Creates a new descriptor for given element keeping the class name to be instantiated in an attribute namedattributeName
. -
Method Summary
-
Field Details
-
element
protected org.eclipse.core.runtime.IConfigurationElement elementThe element from which create an instance. -
attributeName
The name of the attribute that holds the class full name to be instantiated.
-
-
Constructor Details
-
PluginClassDescriptor
public PluginClassDescriptor(org.eclipse.core.runtime.IConfigurationElement element, String attributeName) Creates a new descriptor for given element keeping the class name to be instantiated in an attribute namedattributeName
.- Parameters:
element
- The element from which create an instance.attributeName
- The name of the attribute that holds the class full name to be instantiated.
-
-
Method Details
-
createInstance
Creates a new instance.- Returns:
- the new instance.
- Throws:
RuntimeException
- wraps a CoreException if an instance of the executable extension could not be created for any reason.
-