Skip to content

Conversation

tortmayr
Copy link
Contributor

What it does

How to test

Follow-ups

Changelog

  • This PR should be mentioned in the changelog
  • This PR introduces a breaking change (if yes, provide more details below for the changelog and the migration guide)

@tortmayr tortmayr force-pushed the tortmayr/issues/1371 branch from e9e2479 to 5860cb1 Compare July 17, 2024 15:48
- Add `onFocusChanged` event to focus tracker and also expose it via EditorContextService
- Update documentation on `EditorContextService`. Also expose `onSelectionChanged` event via `EditorContextService` => `EditorContextService` becomes the central component to register for (most) GLSP event listeners
Part of eclipse-glsp/glsp#1371
@tortmayr tortmayr force-pushed the tortmayr/issues/1371 branch from 5860cb1 to 24983e5 Compare July 17, 2024 15:58
tortmayr added a commit to eclipse-glsp/glsp-theia-integration that referenced this pull request Jul 17, 2024
Switch from `onDidChangeActiveWidget` event to `onFoucsChanged` event for restoring the diagram selection.
Reason: The `TheiaSelectionForwarder` is bound once per diagram widget.
By using the `onDidChangeActiveWidget` event we notified and updated all forwarders of all widgets. As a consequence a wrong i.e. currently inactive widget could set the last selection in the selection service

With using the `onFocusChanged` event we can now only update the selection if the diagram currently has focus.

Requires eclipse-glsp/glsp-client#380

Fixes eclipse-glsp/glsp#1371
tortmayr added a commit to eclipse-glsp/glsp-theia-integration that referenced this pull request Jul 17, 2024
Switch from `onDidChangeActiveWidget` event to `onFoucsChanged` event for restoring the diagram selection.
Reason: The `TheiaSelectionForwarder` is bound once per diagram widget.
By using the `onDidChangeActiveWidget` event we notified and updated all forwarders of all widgets. As a consequence a wrong i.e. currently inactive widget could set the last selection in the selection service

With using the `onFocusChanged` event we can now only update the selection if the diagram currently has focus.

Requires eclipse-glsp/glsp-client#380

Fixes eclipse-glsp/glsp#1371
tortmayr added a commit to eclipse-glsp/glsp-theia-integration that referenced this pull request Jul 17, 2024
Switch from `onDidChangeActiveWidget` event to `onFoucsChanged` event for restoring the diagram selection.
Reason: The `TheiaSelectionForwarder` is bound once per diagram widget.
By using the `onDidChangeActiveWidget` event we notified and updated all forwarders of all widgets. As a consequence a wrong i.e. currently inactive widget could set the last selection in the selection service

With using the `onFocusChanged` event we can now only update the selection if the diagram currently has focus.

Requires eclipse-glsp/glsp-client#380

Fixes eclipse-glsp/glsp#1371
@tortmayr tortmayr requested a review from planger July 17, 2024 16:07
@tortmayr tortmayr merged commit 89dfe80 into master Jul 17, 2024
6 checks passed
@tortmayr tortmayr deleted the tortmayr/issues/1371 branch July 17, 2024 21:55
tortmayr added a commit to eclipse-glsp/glsp-theia-integration that referenced this pull request Jul 17, 2024
Switch from `onDidChangeActiveWidget` event to `onFoucsChanged` event for restoring the diagram selection.
Reason: The `TheiaSelectionForwarder` is bound once per diagram widget.
By using the `onDidChangeActiveWidget` event we notified and updated all forwarders of all widgets. As a consequence a wrong i.e. currently inactive widget could set the last selection in the selection service

With using the `onFocusChanged` event we can now only update the selection if the diagram currently has focus.

Requires eclipse-glsp/glsp-client#380

Fixes eclipse-glsp/glsp#1371
holkerveen pushed a commit to holkerveen/glsp-client that referenced this pull request Dec 21, 2024
- Add `onFocusChanged` event to focus tracker and also expose it via EditorContextService
- Update documentation on `EditorContextService`. Also expose `onSelectionChanged` event via `EditorContextService` => `EditorContextService` becomes the central component to register for (most) GLSP event listeners
Part of eclipse-glsp/glsp#1371
holkerveen pushed a commit to holkerveen/glsp-client that referenced this pull request Dec 21, 2024
- Add `onFocusChanged` event to focus tracker and also expose it via EditorContextService
- Update documentation on `EditorContextService`. Also expose `onSelectionChanged` event via `EditorContextService` => `EditorContextService` becomes the central component to register for (most) GLSP event listeners
Part of eclipse-glsp/glsp#1371
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants