mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-10-13 05:18:33 +00:00
comment/uncomment line
Signed-off-by: Akos Kitta <kittaakos@typefox.io>
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user