Validation of Cross-references to Derived Objects is Sketchy - How to debug? [message #1811012] |
Fri, 23 August 2019 10:47  |
Eclipse User |
|
|
|
In my current DSL, I am providing a DerivedStateComputer and installing its derived state when !preLinkingPhase is true (i.e. we are not in the preLinkingPhase).
My derived state is quite complicated because the file format I'm retrofitting this DSL to has ambiguity and a lot of implicit declarations. I can't change the grammar.
I make many crossreferences to derived objects that have been "installed" into various resources - thousands of crossreferences. All of this seems to work in general - i.e. once I get validation running, the crossreferences work and I don't get an error.
However, I'm finding that when I launch my Eclipse instance to test the editor, many of the files are showing that they have errored crossreferences - both in the Project Explorer, the editor itself, and the Problems view.
If I right click and select Validate, the errors go away. But why am I having to manually validate crossreferences? Shouldn't this be done automatically?
I'll open a file and it'll be almost completely red, I manually run validation and almost all of the red goes away.
I have other custom validation that suffers from the same problem where I mark certain items with INFO. When I launch eclipse and a file is open in the DSL editor, I'll have INFO markers in a number of places where I should not. If i manually invoke Validation, they will clean up.
If I select Project -> Clean, I will do a clean rebuild of my project, intially I will get 5000 errors, but then suddenly, the error count will jump to 8000+ and nearly all of those additional 3000 are errored crossreferences to derived objects that would get cleaned up if I did a manual validation of all 150+ files .
I have no idea where to start debugging this. What type of coding errors could lead to this?
Using the DerivedStateComputer is supposed to be the "safe" way to add these derived objects and is compliant with the various phases of compilation, cross linking, and validation. So I'm pretty confused.
Do I need to programmatically kick off a validation whenever I open a file?
[Updated on: Wed, 28 August 2019 10:56] by Moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03147 seconds