Skip to content
Snippets Groups Projects
Commit 832ef831 authored by Erlend Stav's avatar Erlend Stav
Browse files

Combined with other parts of service operation handling

parent b019c3f9
No related branches found
No related tags found
No related merge requests found
......@@ -11,9 +11,22 @@ texttransformation Test2 (in uml:"http://www.eclipse.org/uml2/3.0.0/UML") {
'
@ServiceOperation
'
var separator:String = ""
// Print any outputs
var outList:List = self.ownedParameter->select(par:uml.Parameter | par.direction == "out")
if (!outList.isEmpty()) {
' @Outputs(value = { '
separator = ""
outList->forEach(outParam:uml.Parameter) {
separator + '@Output(name = "' + outParam.name + '")' // TODO: replace name with correct value
separator = ", "
}
'})
'
}
// Print any change effects
if (self.hasStereotype("ServiceProfile")) {
......@@ -35,9 +48,13 @@ texttransformation Test2 (in uml:"http://www.eclipse.org/uml2/3.0.0/UML") {
' public '
'('
self.ownedParameter->forEach( par : uml.Parameter) {
par.direction + " " + par.name
separator = ""
self.ownedParameter->forEach(par:uml.Parameter) {
if (par.direction == "out") {
}
separator + par.direction + ' ' + par.type.name + ' ' par.name
separator = ", "
//uml.ParameterDirectionKind._getFeature("return")
}
')
'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment