schema.factory_override.exsd Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of plantuml-epl Show documentation
Show all versions of plantuml-epl Show documentation
PlantUML is a component that allows to quickly write diagrams from text.
This extension point is used to register an overriding Ecore factory implementation against a namespace URI (Uniform Resource Identifier) in EMF's global package registry, <samp>EPackage.Registry.INSTANCE</samp>. When the corresponding Ecore package is initialized, the package registry is consulted for the registered factory implementation to override the default that would otherwise be used.
A fully qualified identifier of the target extension point.
An optional identifier of the extension instance.
An optional name of the extension instance.
A URI that uniquely identifies an Ecore package for which this factory in an override.
A fully qualified name of the Java class of the overriding factory implementation.
2.2.0
Following is an example of how an overriding factory implementation can be registered:
<pre>
<extension point="org.eclipse.emf.ecore.factory_override" >
<factory uri="http://www.eclipse.org/xsd/2002/XSD" class="org.eclipse.xsd.impl.XSDFactoryImpl"/>
</extension>
</pre>
The value of the class attribute must represent a factory implementation that extends <samp>org.eclipse.emf.ecore.EFactory</samp> and appropriately implements the factory interface of the package being overriden.
<p>
An EMF factory can also be registered from the source code for standalone execution with the <samp>EPackage.Registry.INSTANCE</samp> as follows:
</p>
<pre>
EPackage.Registry.INSTANCE.put
("http://www.eclipse.org/xsd/2002/XSD",
new EPackage.Descriptor()
{
public EPackage getEPackage()
{
return null;
// Or, if you want this to behave like a preregistered package, return the instance being overriden
// return XSDPackage.eINSTANCE
// Or, if there might be a descriptor in the registry already, we might fetch it first, and delegate to that.
}
public EFactory getEFactory()
{
return
new XSDFactoryImpl()
{
// overrides
};
}
});
</pre>
Copyright (c) 2005 IBM Corporation and others.<br>
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at <a
href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>