From dcd6b406857e7cbbf1827cd58dd7dc0926199374 Mon Sep 17 00:00:00 2001 From: Erlend Stav <erlend.stav@sintef.no> Date: Mon, 24 Sep 2012 12:44:06 +0000 Subject: [PATCH] Started on handling effects of different types --- .../transformations/Test2.m2t | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/transformations/org.universaal.tools.transformationcommand/transformations/Test2.m2t b/transformations/org.universaal.tools.transformationcommand/transformations/Test2.m2t index 84cce2991..5c601ef9c 100644 --- a/transformations/org.universaal.tools.transformationcommand/transformations/Test2.m2t +++ b/transformations/org.universaal.tools.transformationcommand/transformations/Test2.m2t @@ -7,7 +7,10 @@ texttransformation Test2 (in uml:"http://www.eclipse.org/uml2/3.0.0/UML") { + var effectTypeMap:Hashtable + uml.Operation::main () { + self.createEffectTypeMap() ' @ServiceOperation ' @@ -33,7 +36,8 @@ texttransformation Test2 (in uml:"http://www.eclipse.org/uml2/3.0.0/UML") { var effectList:List = self.getValue("ServiceProfile", "effects") effectList->forEach(c) { var effectCls:uml.Class = c._getFeature("base_Class") - effectCls.getValue("ServiceEffect", "effectType").name ' ' + var effectType:String = effectCls.getValue("ServiceEffect", "effectType").name + var effectProps:List = effectCls.getValue("ServiceEffect", "effectProperties") effectProps->forEach(p) { var effectProp:uml.Property = c._getFeature("base_Class") @@ -60,4 +64,13 @@ texttransformation Test2 (in uml:"http://www.eclipse.org/uml2/3.0.0/UML") { ' } + + uml.Operation::createEffectTypeMap() { + effectTypeMap.put("CHANGE_EFFECT","@ChangeEffect") + effectTypeMap.put("ADD_EFFECT","@AddEffect") + effectTypeMap.put("REMOVE_EFFECT","@RemoveEffect") + } + + + } \ No newline at end of file -- GitLab