-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix stale resource link flags after project re-open #473
base: master
Are you sure you want to change the base?
Conversation
I'm not sure if this is a good fix, code-wise it doesn't seem like a good change. So far I don't have an idea how a good fix would look like. But lets see how test results look like. |
What is the status of this one? |
Waits for a review |
FWIW, I have trouble to properly understand the use-case. @trancexpress would it be possible to add a test that would demonstrate how to trigger the issue? |
Whenever a project is closed, its resource tree is saved. This includes linked resources in the project. When the project is re-opened, link changes in the .project file are not reflected on the projects resource tree. The old resource tree is read, new information is stored in ProjectDescription.linkDescriptions, but the old linked resources are not touched. This change adjusts Project.open() and Project.close() to set resp. clear the M_LINK flag of linked resources in the project. Fixes: eclipse-platform#470 Signed-off-by: Simeon Andreev <simeon.danailov.andreev@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Simeon, this is a very complex code here and very nice to have a working test.
I've wrote my understanding of the problem and proposed solution idea.
I've pushed rebased, merged & updated PR here to get it easier for the future work - there were massive changes in the resource tests area on master and so the test was not compilable anymore.
Now it compiles & works again.
I believe the code change itself is not enough, I believe we need a different approach which I've tried to draft in #470 (comment).
Whenever a project is closed, its resource tree is saved. This includes
linked resources in the project. When the project is re-opened, link
changes in the .project file are not reflected on the projects resource
tree. The old resource tree is read, new information is stored in
ProjectDescription.linkDescriptions, but the old linked resources are
not touched.
This change adjusts Project.open() and Project.close() to set resp.
clear the M_LINK flag of linked resources in the project.
Fixes: #470