[plaintextgen] Static method calls are not recognized

Hello everyone,

I am using plaintextgen to generate C++ code and so far it is much better than expected.
However, there is a point where I am stucked. I have an expression which needs to be templatized:
return $[templatizedExpression];

Here, the property macro contains the following logic:
value : (templateValue, genContext, node) ->string {
            return MyClass.StaticFunctionCall();

My problem is that 'MyClass' is recognized and generated into QueriesGenerated.java, but 'StaticFunctionCall' is replaced with '???'.
The related error message is: textgen error: 'Unknown target for role baseMethodDeclaration' in [expression] StaticMethodCall null[nodeID] in main@0

Has anybody met with the same problem? I cannot figure out what is wrong. The template is working fine if I replace the method call with e.g. string declaration.
'MyClass' can be found below the main@generator folder, together with TextgenText. 'MyClass' contains static methods only.

1 comment
Comment actions Permalink

Try moving your class to a different model, one that does not have the `@generator` stereotype.


Please sign in to leave a comment.