Same child node type in multiple compartments [message #120010] |
Tue, 17 April 2007 17:47  |
Eclipse User |
|
|
|
Originally posted by: ricker.distributedinstruments.com
I have child nodes that I want to appear on the north, south, east and
west side of the parent. The parent is called "Resource" and the
children are called "Port". I tried creating multiple compartments on
the Resource node named "NorthCompartment", "SouthCompartment", etc. A
child reference can only be assigned to one compartment. If I create a
second child reference for Port for the other compartment, then the same
child appears in both compartments.
Is there a way around this?
|
|
|
|
|
Re: Same child node type in multiple compartments [message #120129 is a reply to message #120025] |
Wed, 18 April 2007 07:23   |
Eclipse User |
|
|
|
Hi,
I had the same problem and managed to get it working by implementing
them as BorderItems and using a custom BorderItemLocator. I did get
the compartment technique to work, by implementing derived features
that divided a "real" feature into sets belonging to each compartment
(like northPorts, southPorts etc. feature). This does not work if the
user should be able to move the ports freely between sides. However,
using BorderItems was much simpler (after I discovered it).
In my case I did some manual code editing (based on the code that is
generated for external labels, which also are BorderItems), for the
the item and its parent, since it requires some cooperation between
these edit part classes. I think it is also possible using the affixed
to parent property (or whatever it's called), but I didn't try that
since I'd already gotten it to work.
Hallvard
On Tue, 17 Apr 2007 17:48:49 -0400, Ricker
<ricker@distributedinstruments.com> wrote:
>Ricker wrote:
>> I have child nodes that I want to appear on the north, south, east and
>> west side of the parent. The parent is called "Resource" and the
>> children are called "Port". I tried creating multiple compartments on
>> the Resource node named "NorthCompartment", "SouthCompartment", etc. A
>> child reference can only be assigned to one compartment. If I create a
>> second child reference for Port for the other compartment, then the same
>> child appears in both compartments.
>>
>> Is there a way around this?
>
>Here is an image of what I am talking about. It seems like a common
>enough problem.
>
|
|
|
Re: Same child node type in multiple compartments [message #120206 is a reply to message #120115] |
Wed, 18 April 2007 08:57  |
Eclipse User |
|
|
|
Originally posted by: ricker.distributedinstruments.com
Non-synchronized diagrams works.
In the GMFMAP you must define the child reference with node mapping for
each compartment; you cannot use "referenced child".
Thanks to you and Hallvard for your help!
Alex Shatalin wrote:
> Hello Ricker,
>
> Looks like a problem with generated ??CanonicalEditPolicy. Try
> non-synchronized diagrams.
>
> -----------------
> Alex Shatalin
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.04125 seconds