Skip to main content



      Home
Home » Eclipse Projects » Sirius » Tool creating
Tool creating [message #1237069] Tue, 28 January 2014 14:49 Go to next message
Eclipse UserFriend
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 15:17] by Moderator

Re: Tool creating [message #1237247 is a reply to message #1237069] Wed, 29 January 2014 03:33 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: Tool creating [message #1237440 is a reply to message #1237247] Wed, 29 January 2014 13:28 Go to previous message
Eclipse UserFriend
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: Sun Jul 06 03:53:49 EDT 2025

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

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

Back to the top