Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [Xpand] Call Template for Null Object
[Xpand] Call Template for Null Object [message #644052] Thu, 09 December 2010 09:38
Gerd Kainz is currently offline Gerd KainzFriend
Messages: 23
Registered: May 2010
Junior Member
Hello everybody,

sometimes it is useful to call an Xpand template like a function. Thereby all information is handed to the template through the parameter list without any concrete object (null) for which the template is called.

Template template.xpt
«DEFINE generate(String content) FOR Void»
    «FILE "Test.txt" -»
        Content: «content»
    «ENDFILE»
«ENDDEFINE»


Template call from workflow
template::generate('Hello World') FOR null


But since Helios this feature is no longer supported. If you call a template with null there is a check which stops the execution. Is there a specific reason for that? Is it possible to reenable this feature?

See https://bugs.eclipse.org/bugs/show_bug.cgi?id=320475

Best regards
Gerd
Previous Topic:How to call JDT source formatting (beautify) after generation
Next Topic:[Xpand] Determine the template file on runtime in an EXPAND statement
Goto Forum:
  


Current Time: Fri Sep 20 20:41:10 GMT 2024

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

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

Back to the top