feat(core-view): CB-2029 action activation fn

This commit is contained in:
Wroud
2022-07-12 14:06:12 +03:00
parent f4f9dd4505
commit 819cf8a1f1
@@ -25,6 +25,12 @@ export class ActionService {
this.handlers = new Map();
}
activateAction(context: IDataContextProvider, action: IAction) {
this
.getAction(context, action)
?.activate();
}
addHandler(handler: IActionHandler): void {
if (this.handlers.has(handler.id)) {
throw new Error(`Action handler with same id (${handler.id}) already exists`);