Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [XPand] Passing context / parameters through expansions
[XPand] Passing context / parameters through expansions [message #531733] Thu, 06 May 2010 00:05 Go to next message
Miles Parker is currently offline Miles Parker
Messages: 1340
Registered: July 2009
Senior Member
I wonder if anyone has any ideas for the following scenario.

1. In AROUND advice in Advice.xpt, I EXPAND Foo in Base.xpt in multiple places.
2. Foo in turn EXPANDS Bar.
3. I advise Bar in with another AROUND in Advice.xpt.
4. I want to do somewhat different things in Bar depending on where I started in (1).

I could of course modify Foo so that I pass in some generic context information that I then pass back through Bar, but obviously that's not very satisfactory as it requires a major refactoring and breaks other advises. In general this is just a consequence of the language design, and perhaps I should refactor to allow generic "hints" to be passed from one EXPAND to another, but I'm wondering if someone has thought of a better way or there is a language feature that I've missed.
Re: [XPand] Passing context / parameters through expansions [message #531772 is a reply to message #531733] Thu, 06 May 2010 06:52 Go to previous message
Darius Jockel is currently offline Darius Jockel
Messages: 63
Registered: July 2009
Member
Hello,

you could try to put your context information into a GLOBALVAR.

Regards
Darius
Previous Topic:[Xtend] Java parameter types
Next Topic:Strange behaviour of EXPAND statement
Goto Forum:
  


Current Time: Fri Oct 31 06:34:58 GMT 2014

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

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