|
Re: Exception when accessing xtext index [message #1760851 is a reply to message #1760763] |
Wed, 03 May 2017 15:40 |
|
The validation may run in a phase that not all reference descriptions are build
Thus you cannot do that
If you want to use validation based on reference descriptions
You should move validation to the builder participant
Depending on what you do you can
Alternatively store some bits in the index entries (ieobjectdescription)
And use these bits inside the validator
(Depends on what you actually validate and how your naming conventions and scoping look like)
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
|
|
|
Re: Exception when accessing xtext index [message #1760858 is a reply to message #1760851] |
Wed, 03 May 2017 16:35 |
I.M. Wiesel Messages: 4 Registered: May 2017 |
Junior Member |
|
|
Thanks for reply, Christian!
My settings is: There are elements of type A which may reference to elements of type B. The instances of A'S and B's are wildy distributed over files in the workspace, but one file may not contain both, A and B, because they are defined in separate grammars.
Now the requirement is that at most one A may reference any B. So a naive approach would be to parse all files with A's for each B. I considered this being not really efficient.
My scope is based on imports of resources, but again, a file with A's imports files with B's, not other way around. So I do not know where B is referenced.
You propose to extend ieobjectdescriptions with the references A->B, is that right?
I did not quite got your other proposal to move the validation to the builder participant. Could you explain this in more detail? And will it be still usable as the "normal", FAST validation?
Thanks!
|
|
|
Re: Exception when accessing xtext index [message #1760859 is a reply to message #1760851] |
Wed, 03 May 2017 16:35 |
I.M. Wiesel Messages: 4 Registered: May 2017 |
Junior Member |
|
|
Thanks for reply, Christian!
My settings is: There are elements of type A which may reference to elements of type B. The instances of A'S and B's are wildy distributed over files in the workspace, but one file may not contain both, A and B, because they are defined in separate grammars.
Now the requirement is that at most one A may reference any B. So a naive approach would be to parse all files with A's for each B. I considered this being not really efficient.
My scope is based on imports of resources, but again, a file with A's imports files with B's, not other way around. So I do not know where B is referenced.
You propose to extend ieobjectdescriptions with the references A->B, is that right?
I did not quite got your other proposal to move the validation to the builder participant. Could you explain this in more detail? And will it be still usable as the "normal", FAST validation?
Thanks!
|
|
|
Re: Exception when accessing xtext index [message #1760860 is a reply to message #1760851] |
Wed, 03 May 2017 16:36 |
I.M. Wiesel Messages: 4 Registered: May 2017 |
Junior Member |
|
|
Thanks for reply, Christian!
My settings is: There are elements of type A which may reference to elements of type B. The instances of A'S and B's are wildy distributed over files in the workspace, but one file may not contain both, A and B, because they are defined in separate grammars.
Now the requirement is that at most one A may reference any B. So a naive approach would be to parse all files with A's for each B. I considered this being not really efficient.
My scope is based on imports of resources, but again, a file with A's imports files with B's, not other way around. So I do not know where B is referenced.
You propose to extend ieobjectdescriptions with the references A->B, is that right?
I did not quite got your other proposal to move the validation to the builder participant. Could you explain this in more detail? And will it be still usable as the "normal", FAST validation?
Thanks!
|
|
|
Re: Exception when accessing xtext index [message #1760861 is a reply to message #1760860] |
Wed, 03 May 2017 16:45 |
|
No I suppose to put
The names (actually the text from the node Modell) of the references to b to the index entries of a
But this won't work if you have imports and thus there can be multiple As
Thus you have to move the validation to a later phase e.g. In builderparticipant
Unfortunately there is no infrastructure you can use for this out of the box
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03424 seconds