@@ -18,22 +18,6 @@ import { OutputChannel, CancellationToken } from 'vscode';
1818 public static Names = new Buffer("name");
1919*/
2020
21- export enum Command {
22- Signature ,
23- Completions ,
24- HoverDefinition ,
25- Usages ,
26- Definitions ,
27- Symbols
28- }
29-
30- const commandMapping = new Map < Command , Buffer > ( ) ;
31- commandMapping . set ( Command . Signature , Commands . Arguments ) ;
32- commandMapping . set ( Command . Completions , Commands . Completions ) ;
33- commandMapping . set ( Command . Definitions , Commands . Definitions ) ;
34- commandMapping . set ( Command . HoverDefinition , Commands . Hover ) ;
35- commandMapping . set ( Command . Usages , Commands . Usages ) ;
36- commandMapping . set ( Command . Symbols , Commands . Names ) ;
3721
3822export class SocketClient extends SocketCallbackHandler {
3923 constructor ( socketServer : SocketServer , private outputChannel : OutputChannel ) {
@@ -50,11 +34,10 @@ export class SocketClient extends SocketCallbackHandler {
5034
5135 this . idDispenser = new IdDispenser ( ) ;
5236 }
53- public getResult < T > ( command : Command , token : CancellationToken , fileName : string , columnIndex : number , lineIndex : number , source : string ) : Promise < T > {
54- const cmd = commandMapping . get ( command ) ;
37+ public getResult < T > ( command : Buffer , token : CancellationToken , fileName : string , columnIndex : number , lineIndex : number , source : string ) : Promise < T > {
5538
5639 const [ def , id ] = this . createId < T > ( token ) ;
57- this . SendRawCommand ( cmd ) ;
40+ this . SendRawCommand ( command ) ;
5841 this . stream . WriteString ( id ) ;
5942
6043 this . stream . WriteString ( fileName ) ;
0 commit comments