Skip to main content



      Home
Home » Eclipse Projects » Sirius » Get Value of the TextArea
Get Value of the TextArea [message #1781379] Tue, 06 February 2018 10:40 Go to next message
Eclipse UserFriend
Hi,

I would like to know how to get value of the Widget/TextArea which comes in a Dialog when a tool is used. Basically, I want to print out that value in console with System.out.println(value) where I call it from a custom Service when "OK" button is pressed.

All I want to do is this;
index.php/fa/32017/0/
index.php/fa/32018/0/
  • Attachment: 1.PNG
    (Size: 3.29KB, Downloaded 590 times)
  • Attachment: 2.PNG
    (Size: 10.05KB, Downloaded 421 times)

[Updated on: Tue, 06 February 2018 11:44] by Moderator

Re: Get Value of the TextArea [message #1792545 is a reply to message #1781379] Thu, 19 July 2018 07:09 Go to previous messageGo to next message
Eclipse UserFriend
Hi
Generally to save any value of any widget we have to give a Eattribute in Ecore and then give that attribute name to the value expression and feature name in set of the widget
Steps
1.Create a Eattribute in Ecore
2.Do generate all and run
3.Go to design go to particular widget open the properties window
4.Give the Eattribute name in the Value Expression field(Example feature:Eattribute name)
5.Right click on the change context under new operation u will find set select that(ignore if Set action is already present)
6.Give the Eattribite's name as the feature name and give var:newValue for value expression of set

To print the value give system.out.println(getEattributes Name())
the get method of the variable will be present impl class

[Updated on: Thu, 19 July 2018 07:12] by Moderator

Re: Get Value of the TextArea [message #1792621 is a reply to message #1792545] Fri, 20 July 2018 06:03 Go to previous message
Eclipse UserFriend
Hi,

The documentation for Text Area is available here https://www.eclipse.org/sirius/doc/specifier/properties/Properties_View_Description.html#text

You have the variable "newValue" available in your model expression.

To do what you want you can add a change context with an aql expression calling a service with newValue as parameter: aql:self.myService(newValue)

Regards,
Previous Topic:Edition Table Line Highlight not working - 3.1.0
Next Topic:Custom node with Sirius
Goto Forum:
  


Current Time: Wed Jul 23 14:33:46 EDT 2025

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

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

Back to the top