diff --git a/transformations/org.universaal.tools.transformationcommand/transformations/Test2.m2t b/transformations/org.universaal.tools.transformationcommand/transformations/Test2.m2t new file mode 100644 index 0000000000000000000000000000000000000000..9a7d3eaff0d56195bdec0e2d835daf2e489c41d1 --- /dev/null +++ b/transformations/org.universaal.tools.transformationcommand/transformations/Test2.m2t @@ -0,0 +1,46 @@ +/** + * transformation Test2 + * date: 19/8/2012 + * author: null + * description: + */ + +texttransformation Test2 (in uml:"http://www.eclipse.org/uml2/3.0.0/UML") { + + uml.Operation::main () { +' + @ServiceOperation +' + // Print any outputs + + + // Print any change effects + + if (self.hasStereotype("ServiceProfile")) { + var effectList:List = self.getValue("ServiceProfile", "effects") + effectList->forEach(c) { + var effectCls:uml.Class = c._getFeature("base_Class") + effectCls.getValue("ServiceEffect", "effectType").name ' ' + var effectProps:List = effectCls.getValue("ServiceEffect", "effectProperties") + effectProps->forEach(p) { + var effectProp:uml.Property = c._getFeature("base_Class") + 'prop:' + effectProp.name + ' ' + } + effectCls.getValue("ServiceEffect", "effectValue") + } +' +' + } + // Print the method signature +' public ' + +'(' + self.ownedParameter->forEach( par : uml.Parameter) { + par.direction + " " + par.name + + } +') +' + + } +} \ No newline at end of file