Two different visual representations for a domain model element [message #141467] |
Thu, 05 July 2007 07:07 |
Eclipse User |
|
|
|
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 #141782 is a reply to message #141467] |
Mon, 09 July 2007 11:27 |
Boris Blajer 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!
|
|
|
Powered by
FUDForum. Page generated in 0.03252 seconds