Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Connecting objects placed inside 2 Compartments
Connecting objects placed inside 2 Compartments [message #169667] Thu, 24 January 2008 11:28 Go to next message
Eclipse UserFriend
Originally posted by: Shwetha.V.in.bosch.com

Hi,

My requirement is connecting 2 objects that are placed in 2 different
Compartments.For example:

In UML diagram I have to draw a polyline connection between 2 attributes
placed inside Compartments in 2 different class figures.

Any help would be appreciated.

Thanks in advance.

Regards,
Shwetha
Re: Connecting objects placed inside 2 Compartments [message #169805 is a reply to message #169667] Fri, 25 January 2008 08:47 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Shwetha,

You have to make these inner nodes "normal figures" - you should create a
complex figure like: rectangle with label in it and use node/label mappings
to point to this rectangle/label figure. Then it will be possible to draw
links to inner elements.

-----------------
Alex Shatalin
Re: Connecting objects placed inside 2 Compartments [message #173164 is a reply to message #169805] Wed, 20 February 2008 13:32 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Andreas.Svendsen.sintef.no

Alex Shatalin wrote:
> You have to make these inner nodes "normal figures" - you should create a
> complex figure like: rectangle with label in it and use node/label
> mappings to point to this rectangle/label figure. Then it will be possible
> to draw links to inner elements.

I have a question related the the inner elements.

Is it possible to set a fixed location for the inner elements?

What i am experiencing now is that the inner element is always placed at the
left side on the compartment. I am able to move the inner element around
after i have placed the compartment on the canvas, but I want its location
to be fixed.

Thanks in advance. I appreciate any help.

--
Andreas Svendsen
Re: Connecting objects placed inside 2 Compartments [message #173919 is a reply to message #169805] Sat, 23 February 2008 14:27 Go to previous messageGo to next message
Alexey Semenov is currently offline Alexey SemenovFriend
Messages: 78
Registered: July 2009
Member
Hi Alex,

Could you please give more details how to create connection links between
nodes from 2 different compartments?

On my diagram the inner nodes are "normal figures" in your terms. What
should I do further in the GMFMap model editor to setup the connections?

Please note that the underlying domain model structure is a complex
relation and I guess I will need to place the appropriate initialization
code somewhere, likely in some canonical edit policy.

Thank you in advance,
Alexey

On Fri, 25 Jan 2008 11:47:45 +0300, Alex Shatalin <vano@borland.com> wrote:

> Hello Shwetha,
>
> You have to make these inner nodes "normal figures" - you should create
> a complex figure like: rectangle with label in it and use node/label
> mappings to point to this rectangle/label figure. Then it will be
> possible to draw links to inner elements.
>
> -----------------
> Alex Shatalin
>
>
Re: Connecting objects placed inside 2 Compartments [message #174316 is a reply to message #173919] Tue, 26 February 2008 11:56 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Shwetha.V.in.bosch.com

Hi Alexey,

I followed the following steps for sample model and got output:

Step 1:
In the semantic model nodes must be represented appropriately.For example :

model(containing Components and Connectors)
|
|_Component
|_shortName
|_providersComponent : Provider
|_requestersComponent :Requester
|
|_Provider
|_shortName
|_requesterRef : Requester
|
|_Requester
|_shortName
|_providerRef : Provider
|
|_Connector
|_shortName
|_providerConnector : Provider
|_requesterConnector:Requester
Step 2:

In your gmfgraph :

i>providerFigure/requesterFigure should have a rectangle with a label.

ii>add compartment and set figure descriptor to componentFigure.(In this
example you should have 2 comapartment one for provider and one for requester
but Figure descriptor remains same for both).

Step 3:

In your gmfmap:Inside Component NodeMapping

i> Add Compartment Mapping and set appropriate compartment
ii>Add ChildReference for provider and set
Containment Feature to providersComponent
Compartment to providerCompartment
iii>Add Node/LabelMapping to the providerChildreference and set

Diagram Node to Node Provider (in this example)
Feature LabelMapping to ProviderShortName

Repeat Step 3 for Requester also

iv>Link Mapping should have source and target set to provider and requester.

I dint use any editPolicy to get the output.
Hope this solves your problem.

Regards,
Shwetha
Re: Connecting objects placed inside 2 Compartments [message #174848 is a reply to message #174316] Thu, 28 February 2008 15:20 Go to previous messageGo to next message
Alexey Semenov is currently offline Alexey SemenovFriend
Messages: 78
Registered: July 2009
Member
Hi Shwetha,

Thanks for the detailed answer.

Please clarify, what do you mean as the model in Step 1, the one with
Components and Connectors? Is it the .ecore one?

Regards,
Alexey


On Tue, 26 Feb 2008 14:56:06 +0300, Shwetha <Shwetha.V@in.bosch.com> wrote:

> Hi Alexey,
>
> I followed the following steps for sample model and got output:
>
> Step 1:
> In the semantic model nodes must be represented appropriately.For
> example :
>
> model(containing Components and Connectors)
> |
> |_Component
> |_shortName
> |_providersComponent : Provider
> |_requestersComponent :Requester
> |
> |_Provider
> |_shortName
> |_requesterRef : Requester
> |
> |_Requester
> |_shortName
> |_providerRef : Provider
> |
> |_Connector
> |_shortName
> |_providerConnector : Provider
> |_requesterConnector:Requester
> Step 2:
>
> In your gmfgraph : i>providerFigure/requesterFigure should have a
> rectangle with a label.
>
> ii>add compartment and set figure descriptor to componentFigure.(In this
> example you should have 2 comapartment one for provider and one for
> requester but Figure descriptor remains same for both).
>
> Step 3:
>
> In your gmfmap:Inside Component NodeMapping i> Add Compartment Mapping
> and set appropriate compartment
> ii>Add ChildReference for provider and set Containment Feature to
> providersComponent
> Compartment to providerCompartment
> iii>Add Node/LabelMapping to the providerChildreference and set Diagram
> Node to Node Provider (in this example)
> Feature LabelMapping to ProviderShortName
>
> Repeat Step 3 for Requester also
>
> iv>Link Mapping should have source and target set to provider and
> requester.
>
> I dint use any editPolicy to get the output.
> Hope this solves your problem.
>
> Regards,
> Shwetha
>
Re: Connecting objects placed inside 2 Compartments [message #175102 is a reply to message #174848] Mon, 03 March 2008 11:49 Go to previous message
Eclipse UserFriend
Originally posted by: Shwetha.V.in.bosch.com

Hi Alexey,


Your right the model is .ecore.Its sample model i thgt wld be useful to
explain.


Regards,
Shwetha
Previous Topic:Connection
Next Topic:gmftool problem
Goto Forum:
  


Current Time: Thu Apr 25 19:52:03 GMT 2024

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

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

Back to the top