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 Apr 25 08:58:48 GMT 2024

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

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

Back to the top