Remember/derive source location when loading model from xml [message #1766728] |
Mon, 26 June 2017 10:36  |
Eclipse User |
|
|
|
Hi,
short context description:
In our project we have created several Ecore models from XSD files.
Also, we have created ResourceServiceProviders and ResourceDescriptionStrategies to include them in the Xtext index.
Now, we want to validate them as part of Xtext validation, which also works fine so far.
The only thing currently missing is that the error markers are always positioned at line 1 of the XML file. (We want to keep the source editor and do not use the EMF structural editor...)
The reason for the error marker at line 1 is that the Issues do not have line number information associated. This is to expect, because we don't have an Xtext node model attached and EMF itself also cannot derive the source location of an EObject or EStructuralFeature per default.
The question: Is there a Resource loadOption or another mechanism I might have missed to make EMF able to remember (or derive) the line/column for EObjects/EStructuralFeatures (e.g., while loading the resource and parsing the XML)?
Or would I have to implement such a mechanism myself by customizing the XML handler?
Thanks,
Stefan
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.06977 seconds