TextGen - hashmap usage

Hi,

I'm pretty new to MPS and currently playing around with it to explore it's capabilities.

I'm currently trying to write a text generator to create a custom XML file from my DSL. But I encounter some problems with this.
When I try to put elements into a hashmap inside a TextGen component there is no put method. I just can not add elements to my hashmap.

TextGen Component
map<string, string> myMap; 
myMap = new hashmap<string, string>;

myMap.put("foo", "bar") //put method missing
prettyPrint();
Is this even the recommended way of using a hashmap like construct inside the TextGen components?
2 comments
The MPS maps use the myMap[key] syntax to read/write values.
0

Please sign in to leave a comment.