-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hi @volodgo, Thank you for your interest in GLSP and Theia! The Theia integration of GLSP actually forwards the diagram selection to the Theia Selection service, so you can just get Theia's //
// get the selection service injected:
@inject(SelectionService) protected readonly selectionService: SelectionService;
// to start listening for selection events:
const disposable = this.selectionService.onSelectionChanged(e => ...);
// to stop listening for selection, dispose the returned disposable of `onSelectionChanged`:
disposable.dispose(); The selection of GLSP editors will be a Of course your approach should work too, but has a stronger dependency to the GLSP diagram widget. In order to stop listening to events, you also just need to invoke |
Beta Was this translation helpful? Give feedback.
Hi @volodgo,
Thank you for your interest in GLSP and Theia!
The Theia integration of GLSP actually forwards the diagram selection to the Theia Selection service, so you can just get Theia's
SelectionService
injected and listen for updates without the need to reach into the diagram widget directly.The selection of GLSP editors will be a
GlspS…