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 09:45 Go to next message
Marco Naddeo is currently offline Marco Naddeo
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 13:48 Go to previous message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6125
Registered: July 2009
Senior Member
Hi,

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

is your friend,

~Christian
Previous Topic:Adding static imports to XExpressions scope
Next Topic:Customizing Syntax Highlighting
Goto Forum:
  


Current Time: Tue Jul 22 03:28:18 EDT 2014

Powered by FUDForum. Page generated in 0.02031 seconds