Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Getting FreeMarker to Wrap EMap as SimpleHash instead of SimpleSequence?
Getting FreeMarker to Wrap EMap as SimpleHash instead of SimpleSequence? [message #989760] Fri, 07 December 2012 10:57 Go to previous message
Brandon Lewis is currently offline Brandon Lewis
Messages: 17
Registered: May 2012
Junior Member
I'm using FreeMarker for text output templating in my tool and passing my EMF model to FreeMarker's DEFAULT ObjectWrapper class.

So far, things have been working right out of the box.

Then I get to EMap. EMap seems to be implemented as an EList of Map entries. FreeMarker's ObjectWrapper appears to wrap that in a SimpleSequence, thus getting rid of my EMap interface.

I can't do ${myVar.getMyMap().get(myKey)} because FreeMarker says something like:

Expected hash. myVar.getMyMap() evaluated instead to FreeMarker.Template.SimpleSequence.


So, I think I have to make my own ObjectWrapper to sort this out. Has anyone done this, or does anyone know of a FreeMarker EMFObjectWrapper?

It's been a long week of getting my butt kicked by various things.
 
Read Message
Read Message
Read Message
Previous Topic:opposite reference from Map$Entry to its container
Next Topic:is there a way to manually build xcore instead of automatic build when something changes?
Goto Forum:
  


Current Time: Sat May 25 15:35:54 EDT 2013

Powered by FUDForum. Page generated in 0.01656 seconds