Skip to content

Show notifications to user as feedback if something fails modifying the model. #1105

Answered by rhumbertgz
rhumbertgz asked this question in Q&A
Discussion options

You must be logged in to vote

Looking at the source code of the @eclipse-glsp/server-node I found the solution for both notifications. Here I share my findings in case they can help others

Inject an action dispatcher to your handler class implementation (e.g., CreateNodeOperationHandler)

@inject(ActionDispatcher)
protected actionDispatcher: ActionDispatcher;

For actions notifications like '1' (the message is shown when hovering over the INFO icon) use:

this.actionDispatcher.dispatch( ServerStatusAction.create('Your Message', { severity: 'INFO', timeout: 5000 }));

For messages notifications like '2' use:

this.actionDispatcher.dispatch(ServerMessageAction.create('Your Message', { severity: 'INFO', timeout: 5000 }));

He…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by rhumbertgz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant