0
votes

I have an xtext validation precedure which traverses the elements of the document and might find errors on elements in other files as the one being checked. However, when committing the error it is not marked in the other file, but in the current file at the position of the erroneous element in its file.

How can I assign an error to an other file?

1

1 Answers

0
votes

I guess that there is some kind of relationship between the elements in your first document and the element of the other ones. Are the latter imported ? Do your elements cross-reference elements present in other documents ?

In either cases, you should normally be able to access the element at fault in your other document through a reference or a proxy. And once you have this EObject, you can get a link to its resource, on which you should be able to add errors and warnings.

Does it answer your question ?

Alexis