mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-09-24 16:04:36 +08:00
feat(core-view): CB-2029 action activation fn
This commit is contained in:
@@ -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`);
|
||||
|
||||
Reference in New Issue
Block a user