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
public class PluginClassDescriptor<T> extends Object
Simple utility class to create proxy of extension that areinstantiable
.No test of the
validity
of the wrappedIConfigurationElement
is performed. As such you should always extend this class while listening to theIExtensionRegistry
and react properly the removal of the wrappedIConfigurationElement
.Note: this is based on
org.eclipse.emf.ecore.plugin.RegistryReader.PluginClassDescriptor
-
-
Field Summary
Fields Modifier and Type Field Description protected String
attributeName
The name of the attribute that holds the class full name to be instantiated.protected org.eclipse.core.runtime.IConfigurationElement
element
The element from which create an instance.
-
Constructor Summary
Constructors Constructor Description 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
.
-
-
-
Field Detail
-
element
protected org.eclipse.core.runtime.IConfigurationElement element
The element from which create an instance.
-
attributeName
protected String attributeName
The name of the attribute that holds the class full name to be instantiated.
-
-
Constructor Detail
-
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 Detail
-
createInstance
protected T 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.
-
-