Skip to content

How to send message from glsp-server to glsp-theia #1175

Answered by tortmayr
wss29 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @wss29,

the GLSP protocol allows you to send MessageActions and the Theia integration has a default handling for this messages in place that automatically forwards to Theia`s message service and displays them in the message box.
The message action definition looks like this:

export interface MessageAction extends Action {
    kind: typeof MessageAction.KIND;

    severity: SeverityLevel;

    /**
     * The message that shall be shown to the user.
     */
    message: string;

    /**
     * Further details on the message.
     */
    details?: string;
}

The severity level determines whether the message is printed as info, warning or error, if details are passed an additional "Show Det…

Replies: 1 comment

Comment options

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