Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 11:43 Go to next message
serhat gezgin is currently offline serhat gezginFriend
Messages: 243
Registered: January 2013
Location: Izmir
Senior Member
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 09:07 Go to previous messageGo to next message
Niels Brouwers is currently offline Niels BrouwersFriend
Messages: 80
Registered: July 2009
Member
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!


Kind regards,
Niels Brouwers.
Re: How can i change view of element when element attribute changed? [message #1095027 is a reply to message #1080689] Mon, 26 August 2013 14:22 Go to previous message
Ralph Gerbig is currently offline Ralph GerbigFriend
Messages: 702
Registered: November 2009
Senior Member
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: Thu Apr 25 21:56:40 GMT 2024

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

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

Back to the top