Skip to content

Where can I hook into GLSP diagram user interaction events? #75

Answered by planger
glsp-bot asked this question in All other
Discussion options

You must be logged in to vote

To handle client interactions like mouse clicks etc. you need to register a client tool and react by sending actions which then can either be handled on the client by registering an action handler there, or by registering the server as a handler for that action.
There are a few examples for registering a client action is in the glsp client core, such as https://github.com/eclipse-glsp/glsp-client/blob/master/packages/client/src/features/edit-label/edit-label-tool.ts
The only difference is that you register such a tool only in your language-specific DI module.
There is also an example for registering a client handler (see the usage of configureCommand()):
https://github.com/eclipse-glsp/gl…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by planger
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants