How to add a new UML Property as subset of an UML Class in EML [message #1731705] |
Mon, 09 May 2016 12:20 |
|
Hi,
I would like to merge two UML Class Diagrams. For this purpose first I compare two models using ECL and it works correctly. After that I merge them together by following EML code:
pre{
for (p in Target!Package) {
delete p ;
}
var Pack ;
}
rule MergePackage
merge l : Left!Package with r : Right!Package into t : Target!Package {
t.name = l.name + " and " + r.name;
Pack := t ;
}
rule MergeClass
merge l : Left!Class with r : Right!Class into t : Target!Class {
t.name = l.name;
t.isAbstract = l.isAbstract;
Pack.packagedElement.add(t);
}
rule MergeProperty
merge l : Left!Property with r : Right!Property into t : Target!Property{
t.name = l.name ;
}
By using ".packagedElement.add()" I can add new Class to my package, But I don't know how must add new Property to my Class.
This figure shows the result obtained :
and this figure shows the expected result:
I've attached a MinimalExample for you. Can you help me?
Best Regards,
Mohammadreza
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03148 seconds