Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Get Value of the TextArea
Get Value of the TextArea [message #1781379] Tue, 06 February 2018 15:40 Go to next message
Utku Demir is currently offline Utku DemirFriend
Messages: 8
Registered: October 2017
Junior Member
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 311 times)
  • Attachment: 2.PNG
    (Size: 10.05KB, Downloaded 152 times)


Thanks,
Utku Demir

[Updated on: Tue, 06 February 2018 16:44]

Report message to a moderator

Re: Get Value of the TextArea [message #1792545 is a reply to message #1781379] Thu, 19 July 2018 11:09 Go to previous messageGo to next message
Pratiksha Dalal is currently offline Pratiksha DalalFriend
Messages: 19
Registered: May 2018
Junior Member
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 11:12]

Report message to a moderator

Re: Get Value of the TextArea [message #1792621 is a reply to message #1792545] Fri, 20 July 2018 10:03 Go to previous message
Pierre Guilet is currently offline Pierre GuiletFriend
Messages: 161
Registered: June 2017
Senior Member
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,


Pierre Guilet - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:Edition Table Line Highlight not working - 3.1.0
Next Topic:Custom node with Sirius
Goto Forum:
  


Current Time: Thu Sep 20 19:55:47 GMT 2018

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

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

Back to the top