Skip to content
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

Only persist the editing context if there's been actual semantic changes #3892

Open
pcdavid opened this issue Aug 28, 2024 · 0 comments · May be fixed by #3894
Open

Only persist the editing context if there's been actual semantic changes #3892

pcdavid opened this issue Aug 28, 2024 · 0 comments · May be fixed by #3894

Comments

@pcdavid
Copy link
Member

pcdavid commented Aug 28, 2024

Currently we persist the whole editing context any time a handler returns a ChangeKind.SEMANTIC_CHANGE.

Although it's not the common case, it's possible for a handler to return this ChangeKind even though the tool invoked did not actually perform any change in the semantic data (indeed, most tools' behavior is opaque to the handler which invoke them, so the handlers always assume the "worst" and suppose the tool did make some changes).

EMF has native support for resource modification tracking (resource.setTrackingModification(true) on load, and then resource.isModified() to test the flag and resource.setModified(false) to reset it on save), so identifying if any of the project's resources has actually been modified is trivial.

This is a simpler and safer subset of #3637.

@pcdavid pcdavid added this to the 2024.9.0 milestone Aug 28, 2024
pcdavid added a commit that referenced this issue Aug 28, 2024
Bug: #3892
Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
pcdavid added a commit that referenced this issue Aug 28, 2024
Bug: #3892
Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
@pcdavid pcdavid linked a pull request Aug 28, 2024 that will close this issue
39 tasks
@pcdavid pcdavid self-assigned this Aug 28, 2024
@pcdavid pcdavid removed this from the 2024.9.0 milestone Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant