Closed szschaler closed 9 months ago
Generator activity is on this branch: https://github.com/mdenet/platform-examples-private/tree/xtext-generator-activity
The overridden run generator isn't being displayed for some reason.
Thanks.
The overridden run generator isn't being displayed for some reason.
What do you mean?
There is a button specified in the activity file but it's not shown:
That button asks for function-xtext
which isn't in a tool loaded for that activity. Might that be the problem? In any case, what's there is good enough and I should be able to adapt once I have the basic codegen stuff running.
This should use the existing
generate
service generated as part of the Xtext web server.To make this usable in our context, we need to:
HttpServiceContext
to deal with not URL-encoded parameters, possibly defaulting some things if neededdoPost
, set up the new context, so we can get theServiceDescriptor
from theXtextServiceDispatcher
and then calldoService
with that)."fullText"
: text of model (xtext file)"allArtifacts"
: Boolean to indicate if we need all files"resource"
parameter), which can be hard-coded in the activity file, so that code generator can access this in the file names it generates..."includeContent"
: defaults totrue
to indicate we want to actually see the file contents in the responseXtextServlet.doService
with the generator service, which will send back the appropriate JSON file, but will have a'documents'
collection rather than the collection we want and the elements therein may not be formatted correctly... So we may need to rewrite the response slightly, rather than usingdoService
directly... That should just involve a simple iteration over the generated artifacts and encoding them suitably.