Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » How can i change view of element when element attribute changed?
How can i change view of element when element attribute changed? [message #1077984] Fri, 02 August 2013 07:43 Go to next message
Eclipse UserFriend
Hi all,

I have a model element which have type attribute as enum. I need to change this elements view when this type attribute changed. How can i done this ? anyone can help me ?

Regards
Re: How can i change view of element when element attribute changed? [message #1080689 is a reply to message #1077984] Tue, 06 August 2013 05:07 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

I managed to achieve that by contributing a custom EditPolicy using the EditPolicyService. The idea is that an EditPolicy provides (additional) behavior to an EditPart. Using the service you can declare multiple EditPolicies to be installed on existing EditParts.

For more information, look at the GMF help:
Eclipse -> Help -> GMF Developer Guide -> How To -> Runtime -> How To Guide For Diagram Layer Components. There is a subsection How to change the color of a shape dynamically, which probably is similar as what you would like to achieve.

Good luck!
Re: How can i change view of element when element attribute changed? [message #1095027 is a reply to message #1080689] Mon, 26 August 2013 10:22 Go to previous message
Eclipse UserFriend
Hi,

you can use pins in gmfgraph and visual effect mappings in gmfmap to achieve this.

Ralph
Previous Topic:Draw a shape with .gmfgraph
Next Topic:How to decorate domain model elements in GMF?
Goto Forum:
  


Current Time: Mon Jul 07 05:58:24 EDT 2025

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

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

Back to the top