Skip to main content


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: 14661
Registered: July 2009
Senior Member
Hi,

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

is your friend,

~Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Adding static imports to XExpressions scope
Next Topic:Customizing Syntax Highlighting
Goto Forum:
  


Current Time: Fri Mar 29 14:22:23 GMT 2024

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

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

Back to the top