|
|
|
|
|
|
Re: Adding inscriptions to edges and using .svg for Node images [message #1273123 is a reply to message #1273104] |
Wed, 19 March 2014 10:50   |
Eclipse User |
|
|
|
Le 19/03/2014 15:20, Julian Koch a écrit :
> Hello again,
>
> I modified (completely rewrote) my metamodel and added the new meta class for relations.
>
>
> It seems to work: (relation was build in the car.se, not with a tool)
>
>
> How is it different to build an Element based edge tool instead of a Relation based edge tool? Do I have to create a new instance of the metaclass 'Relation'? My attempt isn't really working.
>
>
> Regards,
>
> Julian
>
Hello,
In your creation tool, you have a "Set" task for your field
"inscription" after the Create Instance. However, I think that you
forgot to set the reference "from" and "to". By the way, are you sure
that you need a multi-valued reference for "from" and "to"? A
single-valued reference may be enough.
Regards,
Steve
|
|
|
|
Re: Adding inscriptions to edges and using .svg for Node images [message #1273812 is a reply to message #1273786] |
Thu, 20 March 2014 11:22  |
Eclipse User |
|
|
|
Le 20/03/2014 15:37, Julian Koch a écrit :
> Quote:
>> In your creation tool, you have a "Set" task for your field
>> "inscription" after the Create Instance.
>
> Is that wrong?
No it is ok.
>
> Quote:
>> However, I think that you
>> forgot to set the reference "from" and "to".
>
> Where do I set the reference?
>
> In the creation of the Design I have the Source Finder Expression and Target Finder Expression.
> Screenshot of the working setting:index.php/fa/17798/0/
>
> But where do I set it when creating the edge tool? With additional set values? index.php/fa/17799/0/
Yes as additional set values.
>
> To be honest I'm not even sure if I have to create a new Instance...
As your edge displays a semantic element now (se.Relation in the domain
class of your sample), the edge creation tool needs to create an
instance. However, if your relation is contained by the source element
in your semantic model (Just guessing here, I don't know your
metamodel), the change context expression should be var:source instead
of var:container. In that case the "from" field of the location would
not be needed after all.
>
> What are the additional operations that I need for a creating the element based tool?
> For the Relation based tool in the old model I only added change context (var:source), set value (feature= [name of the relation in the metamodel] and value expression= var:target)
This should be enough for an element based tool. You can find further
information in the documentation : Help/ Help Contents -> Sirius /
Sirius Specifier Manual / Diagrams / Layer and Graphical Elements /
Edges and irius / Sirius Specifier Manual / Diagrams / Tools / Edge Tools.
You can also import with source the sample
"org.eclipse.sirius.sample.ecore.design" a VSM for Ecore models. In the
diagram description Entities, take a look to the EC_EReference edge
mapping and its creation tool(in Section Relation).
>
> Quote:
>> By the way, are you sure
>> that you need a multi-valued reference for "from" and "to"? A
>> single-valued reference may be enough.
>
> I tried it with a single one but if I remove one the edge doesn't show up.
>
> Newer Diagram example: (I only added additional type of edges)
> index.php/fa/17800/0/
>
|
|
|
Powered by
FUDForum. Page generated in 0.05246 seconds