Skip to main content



      Home
Home » Eclipse Projects » Sirius » [Resolved] Sirius Open Dialog
[Resolved] Sirius Open Dialog [message #1768980] Tue, 25 July 2017 07:57 Go to next message
Eclipse UserFriend
Hi there,

I am currently trying to implement an Open Dialogue in container creation.

I first create an Instance (for the container) that I need, then I add an Open Dialogue.

I can manage the Cancel button (to simply remove the instance created) and the OK button (currently it does nothing).

I then add some "text" widget to the dialogue.

My question is, how you do extract the input in the text widget to set the properties of the instance with the inputs?

Cheers,
Will

[Updated on: Mon, 31 July 2017 08:39] by Moderator

Re: Sirius Open Dialog [message #1768985 is a reply to message #1768980] Tue, 25 July 2017 08:52 Go to previous messageGo to next message
Eclipse UserFriend
Hello,

The Open Dialog operation is used to edit a model and it is not expected (yet at least) to access its values/result afterward. Therefore, you should set the properties with a set operation in the OK button.

Regards,
Steve
Re: Sirius Open Dialog [message #1768986 is a reply to message #1768985] Tue, 25 July 2017 08:53 Go to previous messageGo to next message
Eclipse UserFriend
Hi Steve,

Thanks, so if I create the instance in the first place, how do you edit the properties using text widgets?

Cheers,
Will
Re: Sirius Open Dialog [message #1768991 is a reply to message #1768986] Tue, 25 July 2017 09:49 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

In the "Create Instance" operation, there is a "variable name" field. If you add your Open Dialog operation under it, this variable will be accessible.

Regards,
Steve
Re: Sirius Open Dialog [message #1768992 is a reply to message #1768991] Tue, 25 July 2017 09:51 Go to previous messageGo to next message
Eclipse UserFriend
Hi Steve,

I am wonder how you'd access the input in the dialog, suppose i have a text field which asks the user for the "name" property of the instance. How do I access the input that the user enters?

Cheers,
Will
Re: Sirius Open Dialog [message #1769163 is a reply to message #1768992] Thu, 27 July 2017 04:33 Go to previous messageGo to next message
Eclipse UserFriend
Hello,

You can access it with the variable created by the previous "create instance" operation declared by the field "variable name".

Regards,
Steve
Re: Sirius Open Dialog [message #1769179 is a reply to message #1769163] Thu, 27 July 2017 05:54 Go to previous messageGo to next message
Eclipse UserFriend
Hi Steve,

I am afraid you are not answering my question.

So I create an instance and then I open a dialog. With the dialog I create a text widget: name. This text widget should get the user input and set the name of the instance to the user input.

I know how to access the instance created. My question is, how do you access the user input?

Hope this is clear to you.

Cheers,
Will
Re: Sirius Open Dialog [message #1769248 is a reply to message #1769179] Fri, 28 July 2017 04:52 Go to previous messageGo to next message
Eclipse UserFriend
Hi William,

In a Sirius tool, we are always working with the variables accessible starting with self, the current semantic element. In your situation, you just need to create a new instance and then open a dialog containing a page and a group. Once you are on the group, you can use a text widget to edit the value of the property name of the newly created instance.

For a more detailed version, have a look at those screenshots and the final result in video

Regards,

Stephane Begaudeau, Obeo
Re: Sirius Open Dialog [message #1769397 is a reply to message #1769248] Mon, 31 July 2017 06:27 Go to previous message
Eclipse UserFriend
Hi Stephane,

Thanks very much for your help! I have managed to get the open dialog up and running.

Many thanks again.

Cheers,
Will
Previous Topic:Variable label icons
Next Topic:Computed color expression to return R,G,B in one service call
Goto Forum:
  


Current Time: Wed Jul 23 21:27:37 EDT 2025

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

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

Back to the top