Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Two different visual representations for a domain model element
Two different visual representations for a domain model element [message #141467] Thu, 05 July 2007 07:07 Go to next message
Eclipse UserFriend
Originally posted by: twominutehate.joinpoint.org

Hi,

I wonder how I can define alternative visual representations for a
domain model element. I'd like to change the displayed figure per user
request at runtimem, like interface elements in UML tools, where you can
switch to a lollipop representation.

Thanks in advance!
Re: Two different visual representations for a domain model element [message #141500 is a reply to message #141467] Thu, 05 July 2007 08:21 Go to previous messageGo to next message
Gilles Cannenterre is currently offline Gilles CannenterreFriend
Messages: 38
Registered: July 2009
Member
Hello Ömer,

I'm working on this and I've submitted an enhancement request in the GMF
bugzilla..bug#194902
You may vote in the bugzilla for it...that enhancement could be built-in
the next version of the GMF framework..

Regards,

Gilles

Ömer Yildiz a écrit :
> Hi,
>
> I wonder how I can define alternative visual representations for a
> domain model element. I'd like to change the displayed figure per user
> request at runtimem, like interface elements in UML tools, where you can
> switch to a lollipop representation.
>
> Thanks in advance!
Re: Two different visual representations for a domain model element [message #141782 is a reply to message #141467] Mon, 09 July 2007 11:27 Go to previous message
Boris Blajer is currently offline Boris BlajerFriend
Messages: 217
Registered: July 2009
Senior Member
Hi Ömer,

If the visual representation depends on a model property (which I
believe is the most common situation), the correct way of handling this
is to define two NodeMappings (with different visual representations) in
the gmfmap that reference the same underlying element. Then, associate a
domain specialization constraint (and likely, domain element initializer
as well) with each of them. If the constraints are mutually exclusive
and collectively exhaustive, the change of a model property will make
the element go into exactly one of the possible states. This will
trigger replacement of the visual representation, if needed.

Best regards,
Boris


Ömer Yildiz wrote:
> Hi,
>
> I wonder how I can define alternative visual representations for a
> domain model element. I'd like to change the displayed figure per user
> request at runtimem, like interface elements in UML tools, where you can
> switch to a lollipop representation.
>
> Thanks in advance!
Previous Topic:Positioning figure on the diagram programmatically
Next Topic:How can we resize two rectangles one in the other simultaneously?
Goto Forum:
  


Current Time: Thu Apr 25 12:11:45 GMT 2024

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

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

Back to the top