Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » XExpression to String
XExpression to String [message #1060395] Fri, 24 May 2013 13:18 Go to next message
Marc Z is currently offline Marc ZFriend
Messages: 20
Registered: July 2012
Junior Member
Hi,

how can I transform a complete XEpression as entered into the editor into a String using Java?
toString() results in a string of the responding class.

Can anyone help?

Marc
Re: XExpression to String [message #1060401 is a reply to message #1060395] Fri, 24 May 2013 13:34 Go to previous messageGo to next message
Alexander Nittka is currently offline Alexander NittkaFriend
Messages: 1193
Registered: July 2009
Senior Member
Hi,

Use NodeModelUtils to obtain the parse tree node and ask it for the text.

Alex


Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext@itemis.de

[Updated on: Fri, 24 May 2013 13:34]

Report message to a moderator

Re: XExpression to String [message #1060402 is a reply to message #1060395] Fri, 24 May 2013 13:36 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Have a look at NodeModel (via nodemodelutil) you can ask a inode for
its text

--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext at itemis dot de


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: XExpression to String [message #1060411 is a reply to message #1060395] Fri, 24 May 2013 14:13 Go to previous message
Marc Z is currently offline Marc ZFriend
Messages: 20
Registered: July 2012
Junior Member
Thx, works great!

Marc
Previous Topic:Set XText content-type to UTF-8
Next Topic:Creating xtext file as model from GMF
Goto Forum:
  


Current Time: Wed Apr 24 18:25:26 GMT 2024

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

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

Back to the top