Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Implementation of testing api for testing vscode extensions language features [Part 2] #802

Merged
merged 16 commits into from
Sep 10, 2020
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import { CheSideCarContentReaderMainImpl } from './che-sidecar-content-reader-ma
import { CheGithubMainImpl } from './che-github-main';
import { CheOpenshiftMainImpl } from './che-openshift-main';
import { CheOauthMainImpl } from './che-oauth-main';
import { CheLanguagesTestAPIImpl } from './che-languages-test-api';

@injectable()
export class CheApiProvider implements MainPluginApiProvider {
Expand All @@ -43,6 +44,7 @@ export class CheApiProvider implements MainPluginApiProvider {
rpc.set(PLUGIN_RPC_CONTEXT.CHE_USER_MAIN, new CheUserMainImpl(container));
rpc.set(PLUGIN_RPC_CONTEXT.CHE_PRODUCT_MAIN, new CheProductMainImpl(container, rpc));
rpc.set(PLUGIN_RPC_CONTEXT.CHE_SIDERCAR_CONTENT_READER_MAIN, new CheSideCarContentReaderMainImpl(container, rpc));
rpc.set(PLUGIN_RPC_CONTEXT.CHE_LANGUAGES_TEST_API_MAIN, new CheLanguagesTestAPIImpl(container));
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ import { CheTaskResolver } from './che-task-resolver';
import { CheTaskTerminalWidgetManager } from './che-task-terminal-widget-manager';
import { TaskTerminalWidgetManager } from '@theia/task/lib/browser/task-terminal-widget-manager';
import { ContainerPicker } from './container-picker';
import { ChePluginHandleRegistry } from './che-plugin-handle-registry';
import { CheLanguagesMainTestImpl } from './che-languages-test-main';
import { RPCProtocol } from '@theia/plugin-ext/lib/common/rpc-protocol';
import { interfaces } from 'inversify';
import { LanguagesMainFactory } from '@theia/plugin-ext';

export default new ContainerModule((bind, unbind, isBound, rebind) => {
bind(CheApiProvider).toSelf().inSingletonScope();
Expand Down Expand Up @@ -122,4 +127,12 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {

bind(CheTaskTerminalWidgetManager).toSelf().inSingletonScope();
rebind(TaskTerminalWidgetManager).toService(CheTaskTerminalWidgetManager);

bind(ChePluginHandleRegistry).toSelf().inSingletonScope();
bind(CheLanguagesMainTestImpl).toSelf().inTransientScope();
rebind(LanguagesMainFactory).toFactory((context: interfaces.Context) => (rpc: RPCProtocol) => {
const child = context.container.createChild();
child.bind(RPCProtocol).toConstantValue(rpc);
return child.get(CheLanguagesMainTestImpl);
});
});
Loading