Skip to content

Commit

Permalink
GLSP-1302 Fix ServiceConnectionProvider inject in GLSPClientContribut…
Browse files Browse the repository at this point in the history
…ion (#203)

Resolve this binding issue by using the RemoteConnectionProvider Symbol to inject, as it is bound to the ServiceConnectionProvider, to ensure it working for both use cases (browser and electron).

Resolves eclipse-glsp/glsp#1302
  • Loading branch information
ndoschek authored Apr 3, 2024
1 parent 64a1499 commit e1f09c8
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {
} from '@eclipse-glsp/client';
import { Disposable, DisposableCollection, MessageService } from '@theia/core';
import { FrontendApplication } from '@theia/core/lib/browser';
import { ServiceConnectionProvider } from '@theia/core/lib/browser/messaging/service-connection-provider';
import { RemoteConnectionProvider, ServiceConnectionProvider } from '@theia/core/lib/browser/messaging/service-connection-provider';
import { Deferred } from '@theia/core/lib/common/promise-util';
import { inject, injectable } from '@theia/core/shared/inversify';
import { MessageConnection } from 'vscode-jsonrpc';
Expand Down Expand Up @@ -111,7 +111,7 @@ export abstract class BaseGLSPClientContribution implements GLSPClientContributi
}

@inject(MessageService) protected readonly messageService: MessageService;
@inject(ServiceConnectionProvider)
@inject(RemoteConnectionProvider)
protected readonly connectionProvider: ServiceConnectionProvider;

get glspClient(): Promise<GLSPClient> {
Expand Down

0 comments on commit e1f09c8

Please sign in to comment.