Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Command to put to an EMap ?
Command to put to an EMap ? [message #501466] Wed, 02 December 2009 13:11 Go to next message
Guillaume Chatelet is currently offline Guillaume ChateletFriend
Messages: 146
Registered: July 2009
Senior Member
Hello,

I'd like to use EMF.Edit Commands to modify an EMap and put values in it. Is there any PutCommand ? or any advice on how to implement it ?

Best regards,
Guillaume
Re: Command to put to an EMap ? [message #501474 is a reply to message #501466] Wed, 02 December 2009 13:58 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
Guillaume,

No, you need to create a map entry, which must be done reflectively,
e.g., XyzFactory.eINSTANCE(XyzPackage.Literals.MAP_ENTRY_CLASS),
populate it, and then use an AddCommand. To modify an existing entry
you need to use a SetCommand on the value feature. You should never
change the key on a map entry but rather remove the old entry and add a
new one.

Guillaume CHATELET wrote:
> Hello,
>
> I'd like to use EMF.Edit Commands to modify an EMap and put values in
> it. Is there any PutCommand ? or any advice on how to implement it ?
>
> Best regards,
> Guillaume


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:One genmodel vs. multiple genmodels
Next Topic:trouble with nested packages
Goto Forum:
  


Current Time: Fri Apr 26 07:11:21 GMT 2024

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

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

Back to the top