Connecting objects placed inside 2 Compartments [message #169667] |
Thu, 24 January 2008 11:28 |
Eclipse User |
|
|
|
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 #173164 is a reply to message #169805] |
Wed, 20 February 2008 13:32 |
Eclipse User |
|
|
|
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 #174316 is a reply to message #173919] |
Tue, 26 February 2008 11:56 |
Eclipse User |
|
|
|
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
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03378 seconds