Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Tool creating
Tool creating [message #1237069] Tue, 28 January 2014 19:49 Go to next message
Vladimir Vujovich is currently offline Vladimir VujovichFriend
Messages: 4
Registered: January 2014
Junior Member
Hi there!

In my Ecore model, I have a node (N1) which has reference to node (N2).
In my Sirius project I present N1 with Bordered Node object, and N2 with Node object.
I would like to create a tool for creating a Node (N2), but only if user selects a Border Node (N1). I tried to do this (put precondition, Change context), but none of this helped. In Node Creation a container of my N2 is root object.
Whole situation is shown in the attached picture (s17.postimg.org/6rlk9qwxb/Picture.png).

How can I do this?
How can I change a source object for Tool?

http://s17.postimg.org/6rlk9qwxb/Picture.png

Best regards.

[Updated on: Tue, 28 January 2014 20:17] by Moderator

Report message to a moderator

Re: Tool creating [message #1237247 is a reply to message #1237069] Wed, 29 January 2014 08:33 Go to previous messageGo to next message
Maxime Porhel is currently offline Maxime PorhelFriend
Messages: 516
Registered: July 2009
Location: Nantes, France
Senior Member
Le 28/01/2014 21:16, Vladimir Vujovich a écrit :
> Hi there!

Hi Vladimir,

>
> In my Ecore model, I have a node (N1) which has reference to node (N2).
> In my Sirius project I present N1 with Bordered Node object, and N2 with
> Node object. I would like to create a tool for creating a Node (N2), but
> only if user selects a Border Node (N1). I tried to do this (put
> precondition, Change context), but none of this helped. In Node Creation
> a container of my N2 is root object.

Your nodes N2 are specified by a NodeMapping, direct child of the
default layer I think, so the defaut behavior of a
NodeCreationDescription tool it to allow the creation of N2 nodes as
direct children of the diagram to follow the mapping strucure described
in the Viewpoint specification model.

I think you could use the extra mappings field of the creation tool
(Advanced tab) to select the N1 mapping as extra mapping: the tool will
be enabled when the user clicks on a N1 bordered node too.

Then you can use the container variable in the precondition to enable
the tool only for clicks on N1 nodes.

When I write enabled/disabled, please understand that the cursor is the
standard mouse cursor or the "not-allowed" cursor.

If you have enabled the popup bars (Enabled popup bars field in the
General tab of DiagramDescription properties), the your N2 creation tool
will be available in the popup bar when the user selects a N1 bordered node.


> Whole situation is shown in the attached picture
> (s17.postimg.org/6rlk9qwxb/Picture.png).
> How can I do this?
> How can I change a source object for Tool?
>
> s17.postimg.org/6rlk9qwxb/Picture.png
>
> Best regards.

Regards,

Maxime


Maxime Porhel - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Tool creating [message #1237440 is a reply to message #1237247] Wed, 29 January 2014 18:28 Go to previous message
Vladimir Vujovich is currently offline Vladimir VujovichFriend
Messages: 4
Registered: January 2014
Junior Member
Thanx Maxime.

Now works perfectly!!
I'm totally omit "Extra Mappings".

Regards,
Vladimir
Previous Topic:Wrong context in cross table cell
Next Topic:UML models as semantic models in a Modelling Project
Goto Forum:
  


Current Time: Fri Mar 29 09:07:51 GMT 2024

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

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

Back to the top