Class: CommandRunner
core/commandRunner/CommandRunner.CommandRunner
Constructors
constructor
• new CommandRunner(graph
, thatMark
, sourceMark
)
Parameters
Name | Type |
---|---|
graph | Graph |
thatMark | ThatMark |
sourceMark | ThatMark |
Defined in
core/commandRunner/CommandRunner.ts:29
Properties
disposables
• Private
disposables: Disposable
[] = []
Defined in
core/commandRunner/CommandRunner.ts:27
Methods
dispose
▸ dispose(): void
Returns
void
Defined in
core/commandRunner/CommandRunner.ts:232
runCommand
▸ runCommand(command
): Promise
<any
>
Entry point for Cursorless commands. We proceed as follows:
- Canonicalize the action name and target representation using canonicalizeAndValidateCommand, primarily for the purpose of backwards compatibility
- Perform inference on targets to fill in details left out using things
like previous targets. For example we would
automatically infer that
"take funk air and bat"
is equivalent to"take funk air and funk bat"
. See inferFullTargets for details of how this is done. - Construct a ProcessedTargetsContext object to capture the environment needed by processTargets.
- Call processTargets to map each abstract Target object to a concrete list of Target objects.
- Run the requested action on the given selections. The mapping from
action id (eg
remove
) to implementation is defined in Actions. To understand how actions work, see some examples, such as"take"
SetSelection and"chuck"
Delete. See - Update
source
andthat
marks, if they have been returned from the action, and returns the desired return value indicated by the action, if it has one.
Parameters
Name | Type |
---|---|
command | Command |
Returns
Promise
<any
>
Defined in
core/commandRunner/CommandRunner.ts:70
runCommandBackwardCompatible
▸ Private
runCommandBackwardCompatible(spokenFormOrCommand
, ...rest
): Promise
<any
>
Parameters
Name | Type |
---|---|
spokenFormOrCommand | string | Command |
...rest | unknown [] |
Returns
Promise
<any
>
Defined in
core/commandRunner/CommandRunner.ts:203
showUpdateExtensionErrorMessage
▸ showUpdateExtensionErrorMessage(err
): Promise
<void
>
Parameters
Name | Type |
---|---|
err | OutdatedExtensionError |
Returns
Promise
<void
>
Defined in
core/commandRunner/CommandRunner.ts:188