Skip to main content



      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 04:38
Eclipse UserFriend
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: Tue Jul 01 23:26:42 EDT 2025

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

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

Back to the top