|
|
Re: Model inferrer assign non final content to body [message #1740969 is a reply to message #1740541] |
Sun, 21 August 2016 21:21 |
Haniball Hanj Messages: 2 Registered: August 2016 |
Junior Member |
|
|
I solved it. Seems as if you can't generate a string and just assign it to the predefined body variable inside the JvmModelInferrer. BUT you can create a feature.body variable through the *.xtext file like this
PMethod:
'public' 'pFunction' name=ValidID '(' ')' '{'
customBodies+=CustomBody*
body=STRING? #<<<< I mean this
'}';
and then assign the string to feature.body like so
feature.body = myBodyString
And assign this "helper variable" feature.body to the predefined body variable
body = '''«feature.body»'''
So instead of assigning myBodyString directly to body you assign it to feature.body and then feature.body to body.
I don't know if this workaround is intended to work this way but it does and that's all I need at this point ^^
[Updated on: Sun, 21 August 2016 21:25] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.03606 seconds