Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 368348 - [Xtext] org.eclipse.xtext.resource.EObjectAtOffsetHelper.resolveElementAt(XtextResource, int) should return the contained element
Summary: [Xtext] org.eclipse.xtext.resource.EObjectAtOffsetHelper.resolveElementAt(Xte...
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: unspecified   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: M5   Edit
Assignee: Holger Schill CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-11 09:26 EST by Holger Schill CLA
Modified: 2017-09-19 17:16 EDT (History)
1 user (show)

See Also:
sebastian.zarnekow: juno+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Holger Schill CLA 2012-01-11 09:26:50 EST
The method org.eclipse.xtext.resource.EObjectAtOffsetHelper.resolveElementAt(XtextResource, int) returns the same as org.eclipse.xtext.resource.EObjectAtOffsetHelper.resolveCrossReferencedElementAt(XtextResource, int).

To get the element at a special offset that points to a crossreference you have to take the AST and use org.eclipse.xtext.nodemodel.util.NodeModelUtils.findActualSemanticObjectFor(INode).

Maybe we should add a new method that does exactly that.
Comment 1 Holger Schill CLA 2012-01-11 09:48:01 EST
We have to fix org.eclipse.xtext.resource.EObjectAtOffsetHelper.internalResolveElementAt(XtextResource, int, boolean) at add a javaDoc to org.eclipse.xtext.resource.EObjectAtOffsetHelper.resolveElementAt(XtextResource,
int) that this method returns the contained element.
Comment 2 Holger Schill CLA 2012-01-11 10:20:06 EST
pushed to master.
Comment 3 Karsten Thoms CLA 2017-09-19 17:04:34 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 4 Karsten Thoms CLA 2017-09-19 17:16:31 EDT
Closing all bugs that were set to RESOLVED before Neon.0