add 'vscode.newWindow' command

This commit is contained in:
Martin Aeschlimann
2019-03-20 11:43:00 +01:00
parent 819dda9bcc
commit 0455fefeee
3 changed files with 27 additions and 2 deletions

View File

@@ -68,6 +68,25 @@ CommandsRegistry.registerCommand({
}
});
interface INewWindowAPICommandOptions {
}
export class NewWindowAPICommand {
public static ID = 'vscode.newWindow';
public static execute(executor: ICommandsExecutor, options?: INewWindowAPICommandOptions): Promise<any> {
return executor.executeCommand('_files.newWindow', [options]);
}
}
CommandsRegistry.registerCommand({
id: NewWindowAPICommand.ID,
handler: adjustHandler(NewWindowAPICommand.execute),
description: {
description: 'Opens an new window',
args: [
]
}
});
export class DiffAPICommand {
public static ID = 'vscode.diff';
public static execute(executor: ICommandsExecutor, left: URI, right: URI, label: string, options?: vscode.TextDocumentShowOptions): Promise<any> {