Class. Action Dispatcher
protected
commandStack:ICommandStack
Defined in: packages/sprotty/src/base/actions/action-dispatcher.ts:49
protected
diagramLocker:IDiagramLocker
Defined in: packages/sprotty/src/base/actions/action-dispatcher.ts:52
protected
initialized:undefined
|Promise
<void
>
Defined in: packages/sprotty/src/base/actions/action-dispatcher.ts:56
protected
logger:ILogger
Defined in: packages/sprotty/src/base/actions/action-dispatcher.ts:50
protected
postponedActions:PostponedAction
[] =[]
Defined in: packages/sprotty/src/base/actions/action-dispatcher.ts:58
protected
readonly
requests:Map
<string
,Deferred
<ResponseAction
>>
Defined in: packages/sprotty/src/base/actions/action-dispatcher.ts:59
protected
syncer:AnimationFrameSyncer
Defined in: packages/sprotty/src/base/actions/action-dispatcher.ts:51
dispatch(
action
):Promise
<void
>
Defined in: packages/sprotty/src/base/actions/action-dispatcher.ts:76
Dispatch an action by querying all handlers that are registered for its kind. The returned promise is resolved when all handler results (commands or actions) have been processed.
Action
Promise
<void
>
dispatchAll(
actions
):Promise
<void
>
Defined in: packages/sprotty/src/base/actions/action-dispatcher.ts:91
Calls dispatch
on every action in the given array. The returned promise
is resolved when the promises of all dispatch
calls have been resolved.
Action
[]
Promise
<void
>
protected
handleAction(action
):Promise
<void
>
Defined in: packages/sprotty/src/base/actions/action-dispatcher.ts:112
Action
Promise
<void
>
protected
handleBlocked(action
,predicate
):Promise
<void
>
Defined in: packages/sprotty/src/base/actions/action-dispatcher.ts:163
Action
(action
) => boolean
Promise
<void
>
initialize():
Promise
<void
>
Defined in: packages/sprotty/src/base/actions/action-dispatcher.ts:61
Promise
<void
>
request<
Res
>(action
):Promise
<Res
>
Defined in: packages/sprotty/src/base/actions/action-dispatcher.ts:102
Dispatch a request. The returned promise is resolved when a response with matching
identifier is dispatched. That response is not passed to the registered action
handlers. Instead, it is the responsibility of the caller of this method to handle
the response properly. For example, it can be sent to the registered handlers by
passing it again to the dispatch
method.
Res
extends ResponseAction
RequestAction
<Res
>
Promise
<Res
>