|
|
Re: Distinguish different representations of the same class instance [message #1439859 is a reply to message #1439601] |
Tue, 07 October 2014 15:50 |
|
Hello,
I'm not sure if I understood entirely your context, but I think that you
need an Element Base Edge mapping where the Domain Class is Connectionn.
Then the SourceMapping and the TargetMapping are the mapping of the
"WrappedClass" element. The source finder expression should be using the
portOne relation and the opposite reference of "connectors". Likewise,
the target finder expression should be using portTwo and the opposite
reference of "connectors".
Regards,
Steve
Le 07/10/2014 12:11, Jim S. a écrit :
> I created a diagram which should illustrate the issue:
>
> In this model the upper row (Wrapper and Connection) are used to assemble different WrappedClasses.
>
> If I want to create an editor for this metamodel I want to be able to display the Connections. If I have two Wrappers with the same WrappedClasses a Connection to one of the Wrappers I cannot figure out a way to distinguish between the representations of the Connectors on both Wrappers even though they are mappings of the same instance.
>
--
Steve Monnier - Obeo
Need professional services for Sirius?
http://www.obeodesigner.com/sirius
Steve Monnier - Obeo Canada
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
|
Re: Distinguish different representations of the same class instance [message #1440346 is a reply to message #1440074] |
Wed, 08 October 2014 08:43 |
|
Hello,
Well I think that you can do it that way as well, but your metamodel is
more complex than the previous one. You will now have to set the new
references from Connection, that are redundant. In the previous version,
you can create an expression that navigates using an opposite reference
from connectors and wrapped.
Regards,
Steve
Le 08/10/2014 01:11, Jim S. a écrit :
> That works for me, too. I just recognized that the metamodel I uploaded cannot produce the situation im refering to.
>
> This updated one should work:
>
> If I create the Connectors as BorderedNodes on the Wrapper, is it possible to have the Connection displayed between only the two Connectors which are on the Border of the Wrapper refered to by "instanceTarget" and "instanceSource" of the Connection?
>
--
Steve Monnier - Obeo
Need professional services for Sirius?
http://www.obeodesigner.com/sirius
Steve Monnier - Obeo Canada
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
|
Re: Distinguish different representations of the same class instance [message #1442082 is a reply to message #1440523] |
Fri, 10 October 2014 15:34 |
|
Hello,
I think that even in your second solution, you need to start your
source/target finder expression using the wrapper (sourceWrapper and
targetWrapper) + the navigation to the connector. The last one must be
the one used as the semantic expression for your border node. So it
would be something like source finder expression
[sourceWrapper.connector/] and target finder expression
[targetWrapper.connector/].
If this doesn't work, can you join the Metamodel+VSM? It will be easier
to test.
Regards,
Steve
Le 08/10/2014 15:19, Jim S. a écrit :
> I still cant get it to work. I have created an example model:
>
>
> With this I tried two approaches:
> 1.: Have an Element Based Edge between the two wrappers. The Edge is then displayed between the correct wrappers but I want it to be displayed to the Bordered Nodes which represent the Connectors:
>
>
>
> 2.: If I try to create the Edge between the Bordered Nodes there is a second edge, since the ports of Wrapper 1 and 2 are the same instance. This is not intended:
>
>
>
> I want to have a mix of both results, that only display the correct edge, but between the Connectors. Is this possible?
>
--
Steve Monnier - Obeo
Need professional services for Sirius?
http://www.obeodesigner.com/sirius
Steve Monnier - Obeo Canada
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
Re: Distinguish different representations of the same class instance [message #1445448 is a reply to message #1442082] |
Wed, 15 October 2014 13:02 |
Jim S. Messages: 17 Registered: October 2014 |
Junior Member |
|
|
Hi,
I tried to use [{source,target}Wrapper.wrapps.connectors/] as target finder expression, with the same result as in the second example. I suspect this is because the expression simply returns the same result as [{source,target}Connector/].
Im not sure what you mean by joining metamodel and VSP.
I uploaded the project (http://uploaded.net/file/i125bzh2) so that you can test it yourself (if thats what you meant).
Extract the archive and open the tmpworkspace in eclipse. Then launch MetaModel.editor. In the new Instance you should see the test model and the VSP.
[Updated on: Wed, 15 October 2014 13:03] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03348 seconds