Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » Modifying Global variables in Xtend Script(Modifying Global variables in Xtend Script)
Modifying Global variables in Xtend Script [message #506619] Fri, 08 January 2010 06:32
kiran reddy is currently offline kiran reddyFriend
Messages: 8
Registered: July 2009
Junior Member
When we set an global variable initially can we modify it again?

In the below example, i need to modify the value of GLOBALVAR NAME from "Test" to "Testing"

1) creating an Global variable Map
Map<String, Variable> globalVariablesMap=new HashMap<String, Variable>();

2)Adding an new entry to the map
globalVariablesMap.put("NAME", new Variable("NAME","Test"));

3) Adding the global map to execution context so that it is accessible in xtend script
ExecutionContext executionContext = new ExecutionContextImpl(globalVariablesMap);

4) In extend script the map is accessed as:

String getGlobalVariable():
so is there any way that i can modify the value of NAME to "Testing" in a particual extend method so that it is updated value of the corresponding GLOBALVAR NAME.
Previous Topic:[ATL] De Morgan with ATL (Calling called rules)
Next Topic:Modifying GLOBALVAR in extend script
Goto Forum:

Current Time: Mon Oct 21 10:09:55 GMT 2019

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

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

Back to the top