Skip to content

Commit b59fbab

Browse files
angelozerrfbricon
authored andcommitted
workspace/notify notification creates no vscode command as expected
Fixes #1367 Signed-off-by: azerr <azerr@redhat.com>
1 parent 3edeb3a commit b59fbab

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/extension.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { getDocumentSymbolsCommand, getDocumentSymbolsProvider } from './documen
1111
import * as requirements from './requirements';
1212
import { Commands } from './commands';
1313
import {
14-
StatusNotification, ClassFileContentsRequest, ProjectConfigurationUpdateRequest, MessageType, ActionableNotification, FeatureStatus, CompileWorkspaceRequest, CompileWorkspaceStatus, ProgressReportNotification, ExecuteClientCommandRequest, SendNotificationRequest,
14+
StatusNotification, ClassFileContentsRequest, ProjectConfigurationUpdateRequest, MessageType, ActionableNotification, FeatureStatus, CompileWorkspaceRequest, CompileWorkspaceStatus, ProgressReportNotification, ExecuteClientCommandRequest, ServerNotification,
1515
SourceAttachmentRequest, SourceAttachmentResult, SourceAttachmentAttribute
1616
} from './protocol';
1717
import { ExtensionAPI, ExtensionApiVersion, ClasspathQueryOptions, ClasspathResult, registerHoverCommand } from './extension.api';
@@ -364,8 +364,8 @@ export function activate(context: ExtensionContext): Promise<ExtensionAPI> {
364364
return commands.executeCommand(params.command, ...params.arguments);
365365
});
366366

367-
languageClient.onRequest(SendNotificationRequest.type, (params) => {
368-
return commands.executeCommand(params.command, ...params.arguments);
367+
languageClient.onNotification(ServerNotification.type, (params) => {
368+
commands.executeCommand(params.command, ...params.arguments);
369369
});
370370

371371
context.subscriptions.push(commands.registerCommand(Commands.SHOW_JAVA_REFERENCES, (uri: string, position: LSPosition, locations: LSLocation[]) => {

src/protocol.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ export namespace ExecuteClientCommandRequest {
112112
export const type = new RequestType<ExecuteCommandParams, any, void, void>('workspace/executeClientCommand');
113113
}
114114

115-
export namespace SendNotificationRequest {
116-
export const type = new RequestType<ExecuteCommandParams, any, void, void>('workspace/notify');
115+
export namespace ServerNotification {
116+
export const type = new NotificationType<ExecuteCommandParams, void>('workspace/notify');
117117
}
118118

119119
export interface SourceAttachmentRequest {

0 commit comments

Comments
 (0)