Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Radio Button Action
Radio Button Action [message #1776992] Thu, 23 November 2017 13:24 Go to next message
Yash Khatri is currently offline Yash KhatriFriend
Messages: 31
Registered: October 2017
Member
Scenario:

1. I am creating an instance of a class.
2. I am asking the user to select the model element.
3. I am asking the user under which feature this element should be set.

To do step 3:
I am creating a Dialog box where I am showing some radio buttons. I want to get the value selected by the user and based on the selected value I will set the selected model element under that feature.

Question:
1. I am trying to retrieve the value of the radio button selected by the user under begin operation under OK button. The variable "newValue" is not accessible there.
2. Alternatively, I am setting the model element under the begin operation under radio button. But this does not work.

Any pointers? What I am doing wrong here?

index.php/fa/31370/0/


Re: Radio Button Action [message #1776998 is a reply to message #1776992] Thu, 23 November 2017 13:53 Go to previous messageGo to next message
Yash Khatri is currently offline Yash KhatriFriend
Messages: 31
Registered: October 2017
Member
I tried this: https://www.eclipse.org/sirius/doc/specifier/properties/Properties_View_Description.html#radio_group

But, the "newValue" is not accessible under OK button. Compilation error Unrecognized variable: (newValue)
Re: Radio Button Action [message #1777030 is a reply to message #1776998] Thu, 23 November 2017 16:49 Go to previous messageGo to next message
Stephane Begaudeau is currently offline Stephane BegaudeauFriend
Messages: 458
Registered: April 2010
Location: Nantes (France)
Senior Member

Hi,

The variable "newValue" will not be accessible in the OK button. It is accessible in the editExpression of the Radio widget.
You should store it somewhere if you want to retrieve it later on when the user will click on OK (you can store it thanks to a model element, a Java service, etc).

Regards,

Stéphane Bégaudeau, Obeo
Re: Radio Button Action [message #1777078 is a reply to message #1777030] Fri, 24 November 2017 10:39 Go to previous messageGo to next message
Yash Khatri is currently offline Yash KhatriFriend
Messages: 31
Registered: October 2017
Member
Hi Stephane,

Thank you for your reply.

How can I create the expression variable and store this variable. There is no option to create expression variable and I do not want to use the Java Service because, the begin under radio is excuted everytime the selection changes and I do not want to call java service again and again.

Alternatively, I was trying to create a Switch under "Radio" and based on the radio button selected by the user trying to set the property under the instance of Class. But, it does not work.

-Yash

Re: Radio Button Action [message #1777230 is a reply to message #1777078] Mon, 27 November 2017 09:35 Go to previous message
Yash Khatri is currently offline Yash KhatriFriend
Messages: 31
Registered: October 2017
Member
Anyone?
Previous Topic:Specifying concrete syntax as text in Sirius
Next Topic:Sirius Diagramm / EMF manipulation problem
Goto Forum:
  


Current Time: Fri Sep 20 14:47:45 GMT 2024

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

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

Back to the top