Skip to content
This repository was archived by the owner on Nov 6, 2018. It is now read-only.

Commit 4fa2930

Browse files
committed
refactor: remove unused commands
1 parent e56d327 commit 4fa2930

12 files changed

+12
-550
lines changed

src/client/controller.ts

-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import { Client, ClientOptions } from './client'
1414
import { EMPTY_CONTEXT } from './context/context'
1515
import { createObservableEnvironment, EMPTY_ENVIRONMENT, Environment, ObservableEnvironment } from './environment'
1616
import { Extension } from './extension'
17-
import { ExecuteCommandFeature } from './features/command'
1817
import { ContributionFeature } from './features/contribution'
1918
import {
2019
TextDocumentDefinitionFeature,
@@ -212,7 +211,6 @@ export class Controller<X extends Extension, C extends ConfigurationCascade> imp
212211

213212
private registerClientFeatures(client: Client, configuration: Observable<C>): void {
214213
client.registerFeature(new ContributionFeature(this.registries.contribution))
215-
client.registerFeature(new ExecuteCommandFeature(client, this.registries.commands))
216214
client.registerFeature(new TextDocumentDefinitionFeature(client, this.registries.textDocumentDefinition))
217215
client.registerFeature(
218216
new TextDocumentImplementationFeature(client, this.registries.textDocumentImplementation)

src/client/features/command.test.ts

-73
This file was deleted.

src/client/features/command.ts

-72
This file was deleted.

src/client/providers/command.ts

+12-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { BehaviorSubject, Observable, Unsubscribable } from 'rxjs'
2-
import { ExecuteCommandParams } from '../../protocol'
32

43
/** A registered command in the command registry. */
54
export interface CommandEntry {
@@ -10,6 +9,18 @@ export interface CommandEntry {
109
run: (...args: any[]) => Promise<any>
1110
}
1211

12+
export interface ExecuteCommandParams {
13+
/**
14+
* The identifier of the actual command handler.
15+
*/
16+
command: string
17+
18+
/**
19+
* Arguments that the command should be invoked with.
20+
*/
21+
arguments?: any[]
22+
}
23+
1324
/** Manages and executes commands from all extensions. */
1425
export class CommandRegistry {
1526
private entries = new BehaviorSubject<CommandEntry[]>([])

src/extension/old/api.ts

-75
This file was deleted.

src/extension/old/extensionHost.test.ts

-37
This file was deleted.

0 commit comments

Comments
 (0)