Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » Modifying GLOBALVAR in extend script(Modifying GLOBALVAR in extend script)
Modifying GLOBALVAR in extend script [message #506634] Fri, 08 January 2010 07:54
zakir Hussain is currently offline zakir HussainFriend
Messages: 76
Registered: July 2009
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"

eg:
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():
((String) GLOBALVAR NAME)
;
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:Modifying Global variables in Xtend Script
Next Topic:[QVT] Transformation is using UML 3.0.0 versus 2.1.0
Goto Forum:
  


Current Time: Thu Oct 24 05:16:20 GMT 2019

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

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

Back to the top