Skip to content

Commit

Permalink
Implementation of testing api for testing vscode extensions language …
Browse files Browse the repository at this point in the history
…features [Part 2] (eclipse-che#802)

* Added extension testing

Signed-off-by: Josh Pinkney <joshpinkney@gmail.com>

* Fix build errors

Signed-off-by: svor <vsvydenk@redhat.com>

* Add empty line

Signed-off-by: svor <vsvydenk@redhat.com>

* Add selectionRange language action

Signed-off-by: svor <vsvydenk@redhat.com>

* Move language test API under che namespace

Signed-off-by: svor <vsvydenk@redhat.com>

* Add empty line

Signed-off-by: svor <vsvydenk@redhat.com>

* Add empty line

Signed-off-by: svor <vsvydenk@redhat.com>

* Add empty line

Signed-off-by: svor <vsvydenk@redhat.com>

* use thei.Uri instead of plugin-ext/lib/common/uri-components.UriComponents

Signed-off-by: svor <vsvydenk@redhat.com>

* Update language test api to use types from theia/plugin

Signed-off-by: svor <vsvydenk@redhat.com>

* Fix declaration request

Signed-off-by: svor <vsvydenk@redhat.com>

* code cleanup

Signed-off-by: svor <vsvydenk@redhat.com>

Co-authored-by: Josh Pinkney <joshpinkney@gmail.com>
  • Loading branch information
2 people authored and monaka committed Sep 11, 2020
1 parent c0861a6 commit 27f5064
Show file tree
Hide file tree
Showing 11 changed files with 1,507 additions and 2 deletions.
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

0 comments on commit 27f5064

Please sign in to comment.