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

GLSP-1194: Do not send out selection changes if only the root changed #313

Merged
merged 1 commit into from Jan 19, 2024

Conversation

martin-fleck-at
Copy link
Contributor

@martin-fleck-at martin-fleck-at commented Jan 18, 2024

When we receive a model update and the selection state (ids of selected elements) stays the same, we should not send out a selection changed event. Code interested in model updates can listen to root changes manually. This also prevents Theia from permanently updating the selection if only the root element was changed.

Fixes eclipse-glsp/glsp#1194

This can be tested with a Node server that sends an update every second, see https://github.com/eclipse-glsp/glsp-server-node/tree/issues/1194_test

When we receive a model update and the selection state (ids of selected
elements) stays the same, we should not send out a selection changed
event. Code interested in model updates can listen to root changes
manually. This also prevents Theia from permanently updating the
selection if only the root element was changed.

Fixes eclipse-glsp/glsp#1194
Copy link
Contributor

@tortmayr tortmayr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM and works as expected!

@martin-fleck-at martin-fleck-at merged commit 87e78dc into master Jan 19, 2024
6 checks passed
@martin-fleck-at martin-fleck-at deleted the issues/1186 branch January 19, 2024 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Investigate focus change and selection update onModelRootChanged
2 participants