Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Notification from XtoXMap reference
Notification from XtoXMap reference [message #231291] Tue, 26 May 2009 08:50 Go to next message
Eclipse UserFriend
Originally posted by: markus.franz.kapelan.com

Hi,

some of my model elements contain XtoXMap references (according to
http://wiki.eclipse.org/EMF/FAQ#How_do_I_create_a_Map_in_EMF .3F). Now i
need to have the figure for those elements to be sensitive to changes in
those maps. The standard mechanism to make figures sensitive to model
changes (according to
http://wiki.eclipse.org/GMF_Tips#Making_figures_sensitive_to _attributes_of_semantic_elements)
won't work because the model element receives no notification if a map
entry is changed ("put"). How may i receive a notification for changes
in a map?

Regards,
Markus
Re: Notification from XtoXMap reference [message #231354 is a reply to message #231291] Tue, 26 May 2009 11:25 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Markus,

You have to listen parent element of your model element - corresponding EMF
notifications will probably go there.

-----------------
Alex Shatalin
Re: Notification from XtoXMap reference [message #231397 is a reply to message #231354] Tue, 26 May 2009 12:09 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: markus.franz.kapelan.com

Hi,

i tried the parent of the model element and it does not receive the
notifications (and i would be very surprised if it did). But what i
should probably mention:
When the value is first "put" into the map, a notification arrives where
i expect it to arrive. But if the value is updated (also by "put"), no
notification is received.

Markus


> Hello Markus,
>
> You have to listen parent element of your model element - corresponding
> EMF notifications will probably go there.
>
> -----------------
> Alex Shatalin
>
>
Re: Notification from XtoXMap reference [message #231418 is a reply to message #231397] Tue, 26 May 2009 12:19 Go to previous message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Markus,

I can see EStringToStringMapEntryImpl as an example - this class contains
setTypedValue() method sending a notification, so I suppose similar class
should be generated for your map entry element.

-----------------
Alex Shatalin
Previous Topic:Diagram File Structure
Next Topic:Direction of relationship's arrow
Goto Forum:
  


Current Time: Tue Apr 23 07:43:13 GMT 2024

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

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

Back to the top