Hi,
i have this ecore,how i can do to istanciate a class Machine?
core.ecore
<?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="core"
nsURI="http://emf.eventb.org/models/core" nsPrefix="core">
<eClassifiers xsi:type="ecore:EClass" name="EventBObject" abstract="true"
eSuperTypes="http://www.eclipse.org/emf/2002/Ecore#//EModelElement">
<eOperations name="getContaining" lowerBound="1"
eType="#//EventBObject">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="body" value="EventBObject bObject = this;
while
(!eClass.isSuperTypeOf(
bObject.eClass()))
	if (bObject.eContainer() instanceof
EventBObject) bObject=(EventBObject)bObject.eContainer();
	else
return null;
return bObject;"/>
<details key="documentation" value="returns the nearest container of
this element that is a sub-type eClass
or null if no container of that
type
@param 	the EClass that is the super-type of the returned
elements
@return 	containing EventBObject that is a sub-type of
eClass
"/>
</eAnnotations>
<eParameters name="eClass" lowerBound="1" eType="ecore:EClass
http://www.eclipse.org/emf/2002/Ecore#//EClass"/>
</eOperations>
<eOperations name="getAllContained">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="body" value="EList<EObject> typeObjects = new
BasicEList<EObject>();
typeObjects.add(null);	//include the null
object
for (TreeIterator<EObject>trit =
EcoreUtil.getAllContents(this, resolve); trit.hasNext();){
	EObject
o = trit.next();
	if (eClass.isSuperTypeOf(o.eClass()))
typeObjects.add(o);
}
return typeObjects;"/>
<details key="documentation" value="returns a list of elements that
sub-type eClass and
that are contained (directly or indirectly) by this
element
@param eClass - 	the EClass that is the super-type of the
returned elements
@param resolve - 	whether to resolve
proxies
"/>
</eAnnotations>
<eGenericType eClassifier="ecore:EDataType
http://www.eclipse.org/emf/2002/Ecore#//EEList">
<eTypeArguments eClassifier="ecore:EClass
http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
</eGenericType>
<eParameters name="eClass" lowerBound="1" eType="ecore:EClass
http://www.eclipse.org/emf/2002/Ecore#//EClass"/>
<eParameters name="resolve" lowerBound="1" eType="ecore:EDataType
http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
</eOperations>
<eOperations name="getURI" lowerBound="1">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="body" value="if (eIsProxy()){
	return
((InternalEObject)this).eProxyURI();
}else{
	return
eResource().getURI();
}"/>
<details key="documentation" value="returns the URI of this
element.
(If the element is not loaded, the URI is obtained from the
proxy without loading the element)

[AFTER RE-GENERATING REMOVE THE
TYPE PARAMETER <URI>]"/>
</eAnnotations>
<eGenericType eTypeParameter="#//EventBObject/getURI/URI"/>
<eTypeParameters name="URI"/>
</eOperations>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="EventBElement" abstract="true"
eSuperTypes="#//EventBObject">
<eOperations name="getReferenceWithoutResolving" eType="ecore:EDataType
http://www.eclipse.org/emf/2002/Ecore#//EString">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="body" value="if (this.eIsProxy()){
	return
((InternalEObject)this).eProxyURI().fragment();
}else{
	return
reference;
}"/>
<details key="documentation" value="Returns the 'reference'
attribute of this element.
If this element is a proxy, the reference is
obtained from the proxy URI fragment. Otherwise the value of the reference
attribute is returned"/>
</eAnnotations>
</eOperations>
<eOperations name="doSetReference">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="body" value="if
(this.eIsProxy()){
	((InternalEObject)this).eProxyURI().appendFragment(newReference);
}else{
	reference
= newReference;
}"/>
<details key="documentation" value="Sets the 'reference' attribute
of this element.
If this element is a proxy, the reference is seet in
the proxy URI fragment. Otherwise the value of the reference attribute is
set."/>
</eAnnotations>
<eParameters name="newReference" eType="ecore:EDataType
http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eOperations>
<eStructuralFeatures xsi:type="ecore:EReference" name="extensions"
upperBound="-1"
eType="#//AbstractExtension" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="attributes"
upperBound="-1"
eType="#//StringToAttributeMapEntry" containment="true"
eKeys="#//StringToAttributeMapEntry/key"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="reference"
lowerBound="1"
eType="ecore:EDataType
http://www.eclipse.org/emf/2002/Ecore#//EString" defaultValueLiteral=""
iD="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="EventBCommented"
abstract="true">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="comment"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="EventBCommentedElement"
abstract="true"
eSuperTypes="#//EventBElement #//EventBCommented"/>
<eClassifiers xsi:type="ecore:EClass" name="EventBExpression"
abstract="true">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="expression"
lowerBound="1"
eType="ecore:EDataType
http://www.eclipse.org/emf/2002/Ecore#//EString"
defaultValueLiteral=""""/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass"
name="EventBCommentedExpressionElement" abstract="true"
eSuperTypes="#//EventBCommentedElement #//EventBExpression"/>
<eClassifiers xsi:type="ecore:EClass" name="EventBNamed" abstract="true">
<eOperations name="doGetName" eType="ecore:EDataType
http://www.eclipse.org/emf/2002/Ecore#//EString">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="body" value="assert (this instanceof
<%org.eventb.emf.core.EventBElement%>);
String reference =
((EventBElement)this).getReferenceWithoutResolving();
return
reference.substring(reference.lastIndexOf(".")+1);"/>
<details key="documentation" value="<getName() should be changed
to call this method>

Assumes this is a subclass of
EventBElement.
Returns this element's name or, if it is a proxy, the
name being referenced.
The name is derived from the element's
'reference' attribute which
 includes the element type to ensure that
references are unique within a resource.
(Calling this method will not
resolve any unresolved proxies)."/>
</eAnnotations>
</eOperations>
<eOperations name="doSetName">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="body"
value="((EventBElement)this).setReference(this.eStaticClass().getInstanceClassName()+"."+newName);"/>
<details key="documentation" value="<setName() should be changed
to call this method>

If this is not a subclass of EventBElement
this method does nothing.
Sets the name of this element or, if it is a
proxy, the name being referenced. 
The name is stored in the 'reference'
attribute which also contains the element's 
type to ensure that
references are unique winthin a resource.
(Calling this method will not
resolve any unresolved proxies).

"/>
</eAnnotations>
<eParameters name="newName" eType="ecore:EDataType
http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eOperations>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name"
lowerBound="1" eType="ecore:EDataType
http://www.eclipse.org/emf/2002/Ecore#//EString"
volatile="true" transient="true" defaultValueLiteral=""
derived="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="EventBNamedCommentedElement"
abstract="true"
eSuperTypes="#//EventBCommentedElement #//EventBNamed"/>
<eClassifiers xsi:type="ecore:EClass" name="EventBPredicate"
abstract="true">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="predicate"
lowerBound="1"
eType="ecore:EDataType
http://www.eclipse.org/emf/2002/Ecore#//EString"
defaultValueLiteral=""true""/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass"
name="EventBNamedCommentedPredicateElement"
abstract="true" eSuperTypes="#//EventBNamedCommentedElement
#//EventBPredicate"/>
<eClassifiers xsi:type="ecore:EClass" name="EventBDerived"
abstract="true">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="theorem"
lowerBound="1"
eType="ecore:EDataType
http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
defaultValueLiteral="false"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass"
name="EventBNamedCommentedDerivedPredicateElement"
abstract="true" eSuperTypes="#//EventBNamedCommentedPredicateElement
#//EventBDerived"/>
<eClassifiers xsi:type="ecore:EClass" name="EventBAction" abstract="true">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="action"
lowerBound="1"
eType="ecore:EDataType
http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass"
name="EventBNamedCommentedActionElement" abstract="true"
eSuperTypes="#//EventBNamedCommentedElement #//EventBAction"/>
<eClassifiers xsi:type="ecore:EClass"
name="EventBNamedCommentedComponentElement"
abstract="true" eSuperTypes="#//EventBNamedCommentedElement"/>
<eClassifiers xsi:type="ecore:EClass" name="Project"
eSuperTypes="#//EventBNamedCommentedElement">
<eStructuralFeatures xsi:type="ecore:EReference" name="components"
upperBound="-1"
eType="#//EventBNamedCommentedComponentElement" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Extension"
eSuperTypes="#//AbstractExtension"/>
<eClassifiers xsi:type="ecore:EEnum" name="AttributeType">
<eLiterals name="Boolean" literal="Boolean"/>
<eLiterals name="Handle" value="1" literal="IRodinElement"/>
<eLiterals name="Integer" value="2" literal="Integer"/>
<eLiterals name="Long" value="3" literal="Long"/>
<eLiterals name="String" value="4" literal="String"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="StringToAttributeMapEntry"
instanceClassName="java.util.Map$Entry">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="key"
lowerBound="1" eType="ecore:EDataType
http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="value"
eType="#//Attribute"
containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Attribute"
eSuperTypes="#//EventBObject">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="type"
lowerBound="1" eType="#//AttributeType"
defaultValueLiteral=""/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="value"
lowerBound="1" eType="ecore:EDataType
http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="AbstractExtension"
abstract="true" eSuperTypes="#//EventBElement">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="extensionId"
lowerBound="1"
eType="ecore:EDataType
http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eClassifiers>
<eSubpackages name="machine" nsURI="
http://emf.eventb.org/models/core/machine" nsPrefix="machine">
<eClassifiers xsi:type="ecore:EClass" name="Machine"
eSuperTypes="#//EventBNamedCommentedComponentElement">
<eStructuralFeatures xsi:type="ecore:EReference" name="refines"
upperBound="-1"
eType="#//machine/Machine"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="refinesNames"
upperBound="-1"
eType="ecore:EDataType
http://www.eclipse.org/emf/2002/Ecore#//EString"
volatile="true" transient="true" derived="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="sees"
upperBound="-1"
eType="#//context/Context"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="seesNames"
upperBound="-1"
eType="ecore:EDataType
http://www.eclipse.org/emf/2002/Ecore#//EString"
volatile="true" transient="true" derived="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="variables"
upperBound="-1"
eType="#//machine/Variable" containment="true"
resolveProxies="false"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="invariants"
upperBound="-1"
eType="#//machine/Invariant" containment="true"
resolveProxies="false"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="variant"
eType="#//machine/Variant"
containment="true" resolveProxies="false"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="events"
upperBound="-1"
eType="#//machine/Event" containment="true"
resolveProxies="false"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Variable"
eSuperTypes="#//EventBNamedCommentedElement"/>
<eClassifiers xsi:type="ecore:EClass" name="Invariant"
eSuperTypes="#//EventBNamedCommentedDerivedPredicateElement"/>
<eClassifiers xsi:type="ecore:EClass" name="Variant"
eSuperTypes="#//EventBCommentedExpressionElement"/>
<eClassifiers xsi:type="ecore:EClass" name="Event"
eSuperTypes="#//EventBNamedCommentedElement">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="convergence"
eType="#//machine/Convergence"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="extended"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
unsettable="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="refines"
upperBound="-1"
eType="#//machine/Event"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="refinesNames"
upperBound="-1"
eType="ecore:EDataType
http://www.eclipse.org/emf/2002/Ecore#//EString"
volatile="true" transient="true" derived="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="parameters"
upperBound="-1"
eType="#//machine/Parameter" containment="true"
resolveProxies="false"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="guards"
upperBound="-1"
eType="#//machine/Guard" containment="true"
resolveProxies="false"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="witnesses"
upperBound="-1"
eType="#//machine/Witness" containment="true"
resolveProxies="false"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="actions"
upperBound="-1"
eType="#//machine/Action" containment="true"
resolveProxies="false"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EEnum" name="Convergence">
<eLiterals name="ordinary" literal="ordinary"/>
<eLiterals name="convergent" value="1" literal="convergent"/>
<eLiterals name="anticipated" value="2" literal="anticipated"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Parameter"
eSuperTypes="#//EventBNamedCommentedElement"/>
<eClassifiers xsi:type="ecore:EClass" name="Guard"
eSuperTypes="#//EventBNamedCommentedDerivedPredicateElement"/>
<eClassifiers xsi:type="ecore:EClass" name="Witness"
eSuperTypes="#//EventBNamedCommentedPredicateElement"/>
<eClassifiers xsi:type="ecore:EClass" name="Action"
eSuperTypes="#//EventBNamedCommentedActionElement"/>
</eSubpackages>
<eSubpackages name="context" nsURI="
http://emf.eventb.org/models/core/context" nsPrefix="context">
<eClassifiers xsi:type="ecore:EClass" name="Context"
eSuperTypes="#//EventBNamedCommentedComponentElement">
<eStructuralFeatures xsi:type="ecore:EReference" name="extends"
upperBound="-1"
eType="#//context/Context"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="extendsNames"
upperBound="-1"
eType="ecore:EDataType
http://www.eclipse.org/emf/2002/Ecore#//EString"
volatile="true" transient="true" derived="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="sets"
upperBound="-1"
eType="#//context/CarrierSet" containment="true"
resolveProxies="false"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="constants"
upperBound="-1"
eType="#//context/Constant" containment="true"
resolveProxies="false"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="axioms"
upperBound="-1"
eType="#//context/Axiom" containment="true"
resolveProxies="false"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Constant"
eSuperTypes="#//EventBNamedCommentedElement"/>
<eClassifiers xsi:type="ecore:EClass" name="CarrierSet"
eSuperTypes="#//EventBNamedCommentedElement"/>
<eClassifiers xsi:type="ecore:EClass" name="Axiom"
eSuperTypes="#//EventBNamedCommentedDerivedPredicateElement"/>
</eSubpackages>
</ecore:EPackage>
_______________________________________________
Topcased-users mailing list
[email protected]
http://lists.gforge.enseeiht.fr/mailman/listinfo/topcased-users