final touch at heap service removal, #74846

This commit is contained in:
Johannes Rieken
2019-06-19 10:58:12 +02:00
parent a409cd27a5
commit c8843e3b0d
5 changed files with 16 additions and 50 deletions

View File

@@ -210,7 +210,7 @@ export class CommandsConverter {
this._commands.registerCommand(true, this._delegatingCommandId, this._executeConvertedCommand, this);
}
toInternal2(command: vscode.Command | undefined, disposables: DisposableStore): CommandDto | undefined {
toInternal(command: vscode.Command | undefined, disposables: DisposableStore): CommandDto | undefined {
if (!command) {
return undefined;
@@ -240,40 +240,6 @@ export class CommandsConverter {
return result;
}
toInternal(command: vscode.Command): CommandDto;
toInternal(command: undefined): undefined;
toInternal(command: vscode.Command | undefined): CommandDto | undefined;
toInternal(command: vscode.Command | undefined): CommandDto | undefined {
if (!command) {
return undefined;
}
const result: CommandDto = {
$ident: undefined,
id: command.command,
title: command.title,
};
if (command.command && isNonEmptyArray(command.arguments)) {
// we have a contributed command with arguments. that
// means we don't want to send the arguments around
const id = ++this._cachIdPool;
this._cache.set(id, command);
result.$ident = id;
result.id = this._delegatingCommandId;
result.arguments = [id];
}
if (command.tooltip) {
result.tooltip = command.tooltip;
}
return result;
}
fromInternal(command: modes.Command): vscode.Command | undefined {
const id = ObjectIdentifier.of(command);