Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » How to obtain EMF model at certain offset
How to obtain EMF model at certain offset [message #1025503] Tue, 26 March 2013 10:46
Marco Naddeo is currently offline Marco NaddeoFriend
Messages: 62
Registered: November 2012
Member
Hi Smile

if I have a text region (offset and length) in a XtextDocument and I want to obtain the corresponding EMF model sub-AST, how can I get this? Is there a method in some class to do that?

I looked at the EObjectAtOffsetHelper class, but the only method that works on a ITextRegion (getCrossReferenceNode) also wants a XtextResource... but given a XtextDocument how can I get the corresponding resource? And in any case, does this method return what I want? Confused


Thanks in advance,
Marco
Previous Topic:Xtext: Referencing Elements of one DSL from another DSL Problem
Next Topic:How get XtextEditor starting from a node of document AST?
Goto Forum:
  


Current Time: Thu May 28 19:18:59 GMT 2020

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

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

Back to the top