Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » using a map/dictionary data structure with Acceleo
using a map/dictionary data structure with Acceleo [message #1854225] Mon, 08 August 2022 12:55 Go to next message
Jad El-khoury is currently offline Jad El-khouryFriend
Messages: 61
Registered: August 2015
Member
Is there a way one can use a map/dictionary data structure in Acceleo? I can see various forms of Collections (Set, OrdereSet, etc). But how can I construct some form of HashMap/dictionary?
Re: using a map/dictionary data structure with Acceleo [message #1854232 is a reply to message #1854225] Mon, 08 August 2022 16:01 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7681
Registered: July 2009
Senior Member
Hi

Acceleo is based on the Classic Eclipse OCL that is close to the OCL specifocation. The newer Pivot-based Eclipse OCL prototypes resolution of many problems with the OCL specification. The absence of a Map type is just one of them.

Sadly Acceleo has not tracked these advances so your only option is to do-it-yourself and wrap a java Map behind Acceleo's invoke capabilities.

The Map type is written up at http://www.eclipse.org/modeling/mdt/ocl/docs/publications/OCL2019MapType/OCLMapType.pdf

Regards

Ed Willink
Re: using a map/dictionary data structure with Acceleo [message #1854270 is a reply to message #1854232] Tue, 09 August 2022 20:08 Go to previous message
Jad El-khoury is currently offline Jad El-khouryFriend
Messages: 61
Registered: August 2015
Member
Got it. Thanks Ed. Will there be any significant performance issues if I use a Java Map? I know it's a very general question, but anything to watch out for when calling Java from Acceleo?
Previous Topic:Acceleo 4.0.0 ?
Next Topic:[Acceleo] Null when accessing reference from a linked metamodel
Goto Forum:
  


Current Time: Fri Dec 27 01:06:08 GMT 2024

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

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

Back to the top