Link ending in a compartment [message #226188] |
Wed, 15 April 2009 08:15  |
Eclipse User |
|
|
|
Originally posted by: kalin.nakov.gmail.com
Greetings,
I have some symbols which have compartments. The generated GMF editor does
not allow me neither to start, nor to end a link on a symbol's compartment.
I can do this only if I start or end the link on the symbol's title area.
Where should I modify the generated code so that the compartment can become
a valid link source & target?
Thanks in advance,
Kalin
|
|
|
|
|
Re: Link ending in a compartment [message #226403 is a reply to message #226398] |
Thu, 16 April 2009 08:49   |
Eclipse User |
|
|
|
Originally posted by: tobk42.gmx.de
Hello Kalin and Alex,
I have another suggestion: I think it would be cool if the popup-box for
selecting an element type to create or an existing element, that appears
when ending a connection on top of a compartment, could be given another
line: "create connection to this element". Alex, can you tell me where
I'd have to look in order to add this feature?
Regards,
tobias
Kalin Nakov schrieb:
> Hello again,
>
> I have added the needed code, but no breakpoint was hit in the new code.
> Then I have modified the getCommand() method of my compartment's
> CreationEditPolicy() by converting the
> CreateUnspecifiedTypeConnectionRequest to CreateRelationshipRequest and
> passing it to the new compartment's getCreateRelationshipCommand() method.
> This created the appropriate creation command for my link. Unfortunately
> the
> cursor changed to a Hand cursor (ConnectionCreationTool.calculateCursor())
> and creation of a link was impossible. As I see from the GMF source code,
> there is a special handling when drawing links to/from a compartment
> which I
> want to remove. Can you advise me how to continue with this?
>
> Thanks in advance,
> Kalin
>
> "Alex Shatalin" <vano@borland.com> wrote in message
> news:3c3172e62c2658cb8c00331d287c@news.eclipse.org...
>> Hello Kalin,
>>
>> You have to implement
>> <Compartment>ItemSemanticEditPolicy.getCreateRelationshipCommand()
>> method.
>>
>> -----------------
>> Alex Shatalin
>>
>>
>
|
|
|
|
Re: Link ending in a compartment [message #226531 is a reply to message #226410] |
Fri, 17 April 2009 05:21   |
Eclipse User |
|
|
|
Originally posted by: tobk42.gmx.de
Hello Alex,
you are right, it works in the Ecore diagram editor, but this is because
these compartments have a list layout. I tried it in my diagram editor,
and for those compartments that have a list layout (in my case, a BPMN
pool) links can be ended ontop of the compartment, while for
compartments with an XY layout (e.g. BPMN subprocess) they can not.
There seem to be some other curious differences between these two types
of compartments I wasn't aware of until now. E.g., it seems that in a
figure with a list layout compartment you can drop a new element from
the palette on the label, while for an XY layout compartment you have to
target the compartment itself (makes sense, as in the latter case the
figure needs some coordinates). I think I'll try to investigate the
differences between these two types of compartments in my diagram code.
Regards,
Tobias
Alex Shatalin schrieb:
> Hello tobias,
>
> I've just tried to reproduce this problem with ecore diagram example
> from CVS:
> - I have two classes one contains a number of attributes.
> - I'm trying to create association link from one class to another one
> and drag this link above attributes compartment.
> It is possible to create this link by dropping mouse there.. So, are you
> sure you are using latest GMF to generate code? Can you provide me with
> the steps to repeat this problem on ecore example?
>
> -----------------
> Alex Shatalin
>
>
|
|
|
|
|
Re: Link ending in a compartment [message #234128 is a reply to message #226577] |
Thu, 18 June 2009 11:54   |
Eclipse User |
|
|
|
Hi Kalin,
Hi Alex,
Hi Tobias,
I want to have the same feature as you want Kalin but without infinite
level, I want node which have links on elements in Compartement of other
Nodes (these nodes are similar to UMLClass with Property in Compartement).
If I set "List Layout" in my gmfgen to false, my compartment elements
disappears.
Alex, Tobias, you have said that with EcoreTools, we can add links to
elements in Compartement, I suppose you talk about Package node?
I would like to add link ending to property like in UMLClass with a
StackLayout in my gmfgraph.
How can do it?
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04469 seconds