use of org.eclipse.xtext.util.ITextRegionWithLineInformation in project xtext-core by eclipse.
the class TracingSugar method location.
/**
* @param obj the EObject containing the feature
* @param feature the EStructuralFeature to trace
* @param idx the index of the value to trace, in case the feature contains a list, should be <code>-1</code> otherwise.
*
* @return ILocationData covering the <code>fullTextRegion</code> of the given feature in the given EObject.
*/
public ILocationData location(final EObject obj, final EStructuralFeature feature, final int idx) {
final ITextRegion region = this.locationProvider.getFullTextRegion(obj, feature, idx);
final SourceRelativeURI uri = this.traceURIConverter.getURIForTrace(obj.eResource());
return new LocationData(((ITextRegionWithLineInformation) region), uri);
}
Aggregations