Skip to content

Commit

Permalink
GLSP-1071: Rename ServerStatus/ServerMessage action
Browse files Browse the repository at this point in the history
  • Loading branch information
tortmayr committed Sep 14, 2023
1 parent 33b5d18 commit 625fadb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import {
EndProgressAction,
FeatureModule,
ServerMessageAction,
MessageAction,
StartProgressAction,
UpdateProgressAction,
configureActionHandler
Expand All @@ -27,7 +27,7 @@ import { TheiaGLSPMessageService } from './theia-glsp-message-service';
export const theiaNotificationModule = new FeatureModule((bind, unbind, isBound, rebind) => {
const context = { bind, unbind, isBound, rebind };
bind(TheiaGLSPMessageService).toSelf().inSingletonScope();
configureActionHandler(context, ServerMessageAction.KIND, TheiaGLSPMessageService);
configureActionHandler(context, MessageAction.KIND, TheiaGLSPMessageService);
configureActionHandler(context, StartProgressAction.KIND, TheiaGLSPMessageService);
configureActionHandler(context, UpdateProgressAction.KIND, TheiaGLSPMessageService);
configureActionHandler(context, EndProgressAction.KIND, TheiaGLSPMessageService);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
EndProgressAction,
IActionHandler,
ICommand,
ServerMessageAction,
MessageAction,
StartProgressAction,
UpdateProgressAction
} from '@eclipse-glsp/client';
Expand All @@ -36,7 +36,7 @@ export class TheiaGLSPMessageService implements IActionHandler {
protected progressReporters: Map<string, Progress> = new Map();

handle(action: Action): void | Action | ICommand {
if (ServerMessageAction.is(action)) {
if (MessageAction.is(action)) {
return this.message(action);
}
if (StartProgressAction.is(action)) {
Expand All @@ -50,7 +50,7 @@ export class TheiaGLSPMessageService implements IActionHandler {
}
}

protected message(action: ServerMessageAction): void {
protected message(action: MessageAction): void {
if (!this.shouldShowMessage(action)) {
return;
}
Expand Down Expand Up @@ -78,7 +78,7 @@ export class TheiaGLSPMessageService implements IActionHandler {
return 'log';
}

protected shouldShowMessage(action: ServerMessageAction): boolean {
protected shouldShowMessage(action: MessageAction): boolean {
return action.severity !== 'NONE';
}

Expand Down

0 comments on commit 625fadb

Please sign in to comment.