Fix #3928 'Clear output' in ... for markdown cells (#3935)

- Add filtering support for actions, and use for the Clear Output action
This commit is contained in:
Kevin Cunnane
2019-02-06 15:49:20 -08:00
committed by GitHub
parent a2d6955f79
commit f9fe88898d
2 changed files with 12 additions and 2 deletions

View File

@@ -46,6 +46,10 @@ export abstract class CellActionBase extends Action {
super(id, label, icon);
}
public canRun(context: CellContext): boolean {
return true;
}
public run(context: CellContext): TPromise<boolean> {
if (hasModelAndCell(context, this.notificationService)) {
return TPromise.wrap(this.doRun(context).then(() => true));