comment/uncomment line

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
This commit is contained in:
Akos Kitta
2020-07-18 14:57:25 +02:00
parent 939a905a6b
commit c0cadf2b9b
4 changed files with 54 additions and 5 deletions

View File

@@ -87,6 +87,16 @@ export abstract class EditorContribution extends Contribution {
return editor instanceof MonacoEditor ? editor : undefined;
}
protected async run(commandId: string): Promise<any> {
const editor = await this.current();
if (editor) {
const action = editor.getControl().getAction(commandId);
if (action) {
return action.run();
}
}
}
}
export namespace Contribution {