bndrun: refresh model before Resolve to get changes of included .bndrun files #6550
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
this fixes the problem that the Resolve button did not "see" changes of included .bndrun files (e.g. -include: shared.bndrun). So when you changed something in an include and pressed the "Resolve" button , then the "Resolve" process would still see the old state when the BndEditor was initially opened and as if the change to -include: shared.bndrun would not have happened. Previous workaround was to close and open the BndEditor of the actual .bndrun file again
Steps to reproduce
(you can also use this workspace3.zip)
a.bndrun
-include: shared.bndrun
shared.bndrun
a.bndrun
and press Resolve and do not close the editor.Resolve should Succeed.
Now open
shared.bndrun
and remove e.g. two runrepos-OSGI R8 - Build,
-OSGI R8 - Runtime Distro
go back to the still opened
a.bndrun
editor and press Resolve again.Actual Result: It still resolves sucessfully.
Expected Result: Resolve should fail, because we removed the runrepos
If you close and reopen
a.bndrun
and resolve again, then this will expectedly fail, because the model is reloaded and the change to 'shared.bndrun' is seen.This PR basically does that automatically on each press to "Resolve", so that the workaround is no longer needed.
It drastically improves developer experience, because I often was misled by the previous behavior, because I made a change and was suprised that it was not used. I found out by accident that I had to reopen the editor.