Referencing a uml model element from a ecore model [message #622670] |
Fri, 29 June 2007 16:34 |
Andrew Jackson Messages: 24 Registered: July 2009 |
Junior Member |
|
|
Hey,
I am trying to define a traceability meta-model that links model elements
in instances of a requirements meta-model and UML model elements.
So far i have defined a traceability meta-model that has a trace class,
which contains references to NamedElements.
<?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="myTrace"
nsURI="myTrace" nsPrefix="myTrace">
<eClassifiers xsi:type="ecore:EClass" name="Trace">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="id"
eType="ecore:EDataType
platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//E String "/>
<eStructuralFeatures xsi:type="ecore:EReference" name="uml"
eType="ecore:EClass
platform:/plugin/org.eclipse.uml2.uml/model/UML.ecore#//Name dElement "
containment="true"/>
</eClassifiers>
</ecore:EPackage>
After that i create a .genmodel for this and generate all. When i run the
editor to create a .trace model instance i can add a new named element.
This is not what i want to do tho. I want to be able to create a reference
to an existing named element in a separate .uml file.
How do i do this?
Thanks in advance,
Andrew
|
|
|
Powered by
FUDForum. Page generated in 0.03353 seconds