Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » Call service wrapper function in the post() black(Call service wrapper function in the post() black)
Call service wrapper function in the post() black [message #1854545] Wed, 24 August 2022 16:05 Go to next message
Oleg Cohen is currently offline Oleg CohenFriend
Messages: 34
Registered: August 2016
Member
Greetings,

I am interested in running a piece of my own code to post-process/format the resulting text content for a Java class.

I figured the post() section of the template is a good spot to call that function from. I can't find any info on how to call anything other than trim() and a couple of other built-in functions.

I created my own service wrapper with a function:

formatCode(String code): String

When I call it in the post as follows:

post ( formatCode() ) I get an error like this:

org.eclipse.acceleo.engine.AcceleoEvaluationException: Method formatCode() doesn't exist for service codegen.pack.java.utils.CodeGenUtils

Would appreciate guidance on this!

Best,
Oleg
Re: Call service wrapper function in the post() black [message #1854549 is a reply to message #1854545] Wed, 24 August 2022 19:18 Go to previous message
Oleg Cohen is currently offline Oleg CohenFriend
Messages: 34
Registered: August 2016
Member
Never mind ...

Jumped the gun. A user error. I didn't create the wrapper correctly. All is working smoothly.
Previous Topic:How to overwrite previously generated file?
Next Topic:Query returns CamelCase string
Goto Forum:
  


Current Time: Wed Sep 25 02:10:16 GMT 2024

Powered by FUDForum. Page generated in 0.03040 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top