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:Acceleo Compiler
Next Topic:[Xpand] Call Template for Null Object
Goto Forum:
  


Current Time: Tue Nov 21 13:40:41 GMT 2017

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

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