Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Reuse entire group of tools across several diagrams
Reuse entire group of tools across several diagrams [message #1402829] Thu, 17 July 2014 16:39 Go to next message
Felix Dorner is currently offline Felix DornerFriend
Messages: 295
Registered: March 2012
Senior Member
Hi,

To reuse a group and all its tools, would I just create a group
extension and leave its content empty?

Thanks,
Felix
Re: Reuse entire group of tools across several diagrams [message #1402894 is a reply to message #1402829] Fri, 18 July 2014 09:05 Go to previous messageGo to next message
Steve Monnier is currently offline Steve MonnierFriend
Messages: 470
Registered: May 2011
Senior Member
Hello,

You can set a list of tool to reuse on a section (field reuse tools) or
on a layer (field reused tools in the "Import" tab). However, these
tools will still work on the container/node/edge mappings it was
designed for. If you want to reuse these tools in another representation
description, you will need some import mapping.

Regards,
Steve

Le 17/07/2014 18:39, Felix Dorner a écrit :
> Hi,
>
> To reuse a group and all its tools, would I just create a group
> extension and leave its content empty?
>
> Thanks,
> Felix


Steve Monnier - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Reuse entire group of tools across several diagrams [message #1402899 is a reply to message #1402894] Fri, 18 July 2014 09:32 Go to previous messageGo to next message
Felix Dorner is currently offline Felix DornerFriend
Messages: 295
Registered: March 2012
Senior Member
Hi Steve,

On 18/07/2014 11:05, Steve Monnier wrote:
> You can set a list of tool to reuse on a section (field reuse tools) or
> on a layer (field reused tools in the "Import" tab). However, these
> tools will still work on the container/node/edge mappings it was
> designed for. If you want to reuse these tools in another representation
> description, you will need some import mapping.

Hm, so you mean I cannot reuse the section itself but need to reuse
every tool defined in it?

I give an example: Our model has an element "Constraint", and I want to
be able to create constraints on no matter what kind of diagram.

We have many different representation descriptions, and what's currently
done is that every description contains an identical copy of the tool
section that allows users to create and link constraints to elements.
The constraint mapping however is only defined once, referenced in every
copy of the create tool. I would like to define the section only once
and reuse it across all representation descriptions.

Thanks,
Felix
Re: Reuse entire group of tools across several diagrams [message #1402906 is a reply to message #1402899] Fri, 18 July 2014 09:54 Go to previous messageGo to next message
Steve Monnier is currently offline Steve MonnierFriend
Messages: 470
Registered: May 2011
Senior Member
Hello,

Le 18/07/2014 11:32, Felix Dorner a écrit :
> Hi Steve,
>
> On 18/07/2014 11:05, Steve Monnier wrote:
>> You can set a list of tool to reuse on a section (field reuse tools) or
>> on a layer (field reused tools in the "Import" tab). However, these
>> tools will still work on the container/node/edge mappings it was
>> designed for. If you want to reuse these tools in another representation
>> description, you will need some import mapping.
>
> Hm, so you mean I cannot reuse the section itself but need to reuse
> every tool defined in it?

Yes you can define a list of tool to reuse but not directly a section to
reuse. This can be a idea for enhancement to suggest through a new bugzilla.

>
> I give an example: Our model has an element "Constraint", and I want to
> be able to create constraints on no matter what kind of diagram.
>
> We have many different representation descriptions, and what's currently
> done is that every description contains an identical copy of the tool
> section that allows users to create and link constraints to elements.
> The constraint mapping however is only defined once, referenced in every
> copy of the create tool. I would like to define the section only once
> and reuse it across all representation descriptions.

If I get it right, you have defined a mapping for "Constraint" in one
representation. Then the other representations reuse this mapping using
a "mapping import". In that case, you do not need to copy the tools in
the section of each other representations. Just create a section and
select the tool to reuse (defined in the initial representation) in the
"reused tools" field. If the section is dedicated to "Contraint"
elements it will have no sub-element then.

Regards,
Steve

>
> Thanks,
> Felix


Steve Monnier - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Reuse entire group of tools across several diagrams [message #1402920 is a reply to message #1402906] Fri, 18 July 2014 11:17 Go to previous messageGo to next message
Felix Dorner is currently offline Felix DornerFriend
Messages: 295
Registered: March 2012
Senior Member
On 18/07/2014 11:54, Steve Monnier wrote:


> If I get it right, you have defined a mapping for "Constraint" in one
> representation. Then the other representations reuse this mapping using
> a "mapping import".

I had not seen it before: Yes, they use the "imported mappings"
reference on layer element. Last question: The layer element also has a
"reused tools" reference. Is this used to create "groupless" tools?

> In that case, you do not need to copy the tools in
> the section of each other representations. Just create a section and
> select the tool to reuse (defined in the initial representation) in the
> "reused tools" field. If the section is dedicated to "Contraint"
> elements it will have no sub-element then.

Ok. Thank you for your help.
Felix
Re: Reuse entire group of tools across several diagrams [message #1402925 is a reply to message #1402920] Fri, 18 July 2014 11:46 Go to previous messageGo to next message
Steve Monnier is currently offline Steve MonnierFriend
Messages: 470
Registered: May 2011
Senior Member
Le 18/07/2014 13:17, Felix Dorner a écrit :
> On 18/07/2014 11:54, Steve Monnier wrote:
>
>
>> If I get it right, you have defined a mapping for "Constraint" in one
>> representation. Then the other representations reuse this mapping using
>> a "mapping import".
>
> I had not seen it before: Yes, they use the "imported mappings"
> reference on layer element. Last question: The layer element also has a
> "reused tools" reference. Is this used to create "groupless" tools?

It is used if you want tools that do not require the palette, like drag
and drop, label direct edit... I do not think that we allow "groupless"
tools. On the layer element, if you add a creation tool in the "reused
tools" reference it will not be available in the palette.

>
>> In that case, you do not need to copy the tools in
>> the section of each other representations. Just create a section and
>> select the tool to reuse (defined in the initial representation) in the
>> "reused tools" field. If the section is dedicated to "Contraint"
>> elements it will have no sub-element then.
>
> Ok. Thank you for your help.
> Felix
>

You are welcome,
Steve


Steve Monnier - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Reuse entire group of tools across several diagrams [message #1441813 is a reply to message #1402925] Fri, 10 October 2014 08:13 Go to previous messageGo to next message
Felix Dorner is currently offline Felix DornerFriend
Messages: 295
Registered: March 2012
Senior Member
Hi,

I still don't know how to solve this actually. I start over with my
explanation:

We have 20+ types of diagrams, and all need a constraint group.
Currently, every single diagram has a _copy_ of this:

http://imgur.com/wD3Gl6t

This is hardly maintainable.

I'd like to know if there's a better way to do that.
Thanks again for helping out.
Felix
Re: Reuse entire group of tools across several diagrams [message #1441900 is a reply to message #1441813] Fri, 10 October 2014 10:39 Go to previous messageGo to next message
Steve Monnier is currently offline Steve MonnierFriend
Messages: 470
Registered: May 2011
Senior Member
Hi,

If your tools uses a Node/Edge mapping that is an import mapping from an
"initial diagram", you should not have to redefined these tools. Did you
try to remove the 3 tools in the screenshot and reference the same tool
from the "initial diagram" using the "Reused Tools" reference on the
"Group constraints" element of your screenshot?

Regards,
Steve

Le 10/10/2014 10:13, Felix Dorner a écrit :
> Hi,
>
> I still don't know how to solve this actually. I start over with my
> explanation:
>
> We have 20+ types of diagrams, and all need a constraint group.
> Currently, every single diagram has a _copy_ of this:
>
> http://imgur.com/wD3Gl6t
>
> This is hardly maintainable.
>
> I'd like to know if there's a better way to do that.
> Thanks again for helping out.
> Felix


--
Steve Monnier - Obeo

Need professional services for Sirius?
http://www.obeodesigner.com/sirius


Steve Monnier - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Reuse entire group of tools across several diagrams [message #1441928 is a reply to message #1441900] Fri, 10 October 2014 11:30 Go to previous messageGo to next message
Felix Dorner is currently offline Felix DornerFriend
Messages: 295
Registered: March 2012
Senior Member
On 10/10/2014 12:39, Steve Monnier wrote:
> Hi,
>
> If your tools uses a Node/Edge mapping that is an import mapping from an
> "initial diagram", you should not have to redefined these tools. Did you
> try to remove the 3 tools in the screenshot and reference the same tool
> from the "initial diagram" using the "Reused Tools" reference on the
> "Group constraints" element of your screenshot?

The thing is, I don't see a "Reused Tools" reference in the properties
view for Group elements. Only on Section elements.

Felix
Re: Reuse entire group of tools across several diagrams [message #1441944 is a reply to message #1441928] Fri, 10 October 2014 11:52 Go to previous message
Steve Monnier is currently offline Steve MonnierFriend
Messages: 470
Registered: May 2011
Senior Member
Hi,

Yes, but in the "Section" elements, you can reference the "Group"
element of the "initial diagram". This way, the whole group elements
will be reused.

Regards,
Steve

Le 10/10/2014 13:30, Felix Dorner a écrit :
> On 10/10/2014 12:39, Steve Monnier wrote:
>> Hi,
>>
>> If your tools uses a Node/Edge mapping that is an import mapping from an
>> "initial diagram", you should not have to redefined these tools. Did you
>> try to remove the 3 tools in the screenshot and reference the same tool
>> from the "initial diagram" using the "Reused Tools" reference on the
>> "Group constraints" element of your screenshot?
>
> The thing is, I don't see a "Reused Tools" reference in the properties
> view for Group elements. Only on Section elements.
>
> Felix


--
Steve Monnier - Obeo

Need professional services for Sirius?
http://www.obeodesigner.com/sirius


Steve Monnier - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:Filling Color For Sirius Diagram Container
Next Topic:Extending Viewpoints
Goto Forum:
  


Current Time: Mon Apr 06 22:16:45 GMT 2020

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

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

Back to the top