Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » How to obtain starting offset in textual representation of a model element?
How to obtain starting offset in textual representation of a model element? [message #1007330] Tue, 05 February 2013 14:45 Go to next message
Marco Naddeo is currently offline Marco NaddeoFriend
Messages: 62
Registered: November 2012
Member
Hi

I would like to know how it is possible to get the starting offset in the textual representation in my DSL editor for a given element of the EMF model, in other words, for a node of the AST.

Thanks in advance,
Marco Smile
Re: How to obtain starting offset in textual representation of a model element? [message #1007412 is a reply to message #1007330] Tue, 05 February 2013 18:48 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 9175
Registered: July 2009
Senior Member
Hi,

org.eclipse.xtext.nodemodel.util.NodeModelUtils.findActualNodeFor(EObject)

is your friend,

~Christian


Need professional support for Xtext, Xpand, EMF?
Go to: http://xtext.itemis.com
Twitter : @chrdietrich
Blog : christiandietrich.wordpress.com
Previous Topic:Adding static imports to XExpressions scope
Next Topic:Customizing Syntax Highlighting
Goto Forum:
  


Current Time: Sun Jun 26 08:09:23 GMT 2016

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

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