Skip to content

Commit de842b9

Browse files
committed
chore: auto update api docs
1 parent e2c9c1b commit de842b9

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

docs/API-Reference/command/CommandManager.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ const CommandManager = brackets.getModule("command/CommandManager")
1414
* [.execute()](#Command+execute) ⇒ <code>$.Promise</code>
1515
* [.getEnabled()](#Command+getEnabled) ⇒ <code>boolean</code>
1616
* [.getOptions()](#Command+getOptions) ⇒ <code>object</code>
17+
* [.isSupportedInDesignMode()](#Command+isSupportedInDesignMode) ⇒ <code>boolean</code>
1718
* [.setEnabled(enabled)](#Command+setEnabled)
1819
* [.setChecked(checked)](#Command+setChecked)
1920
* [.getChecked()](#Command+getChecked) ⇒ <code>boolean</code>
@@ -61,6 +62,15 @@ Is command enabled?
6162
### command.getOptions() ⇒ <code>object</code>
6263
get the command options
6364

65+
**Kind**: instance method of [<code>Command</code>](#Command)
66+
<a name="Command+isSupportedInDesignMode"></a>
67+
68+
### command.isSupportedInDesignMode() ⇒ <code>boolean</code>
69+
Returns true if the command opted in to running while the workspace is in
70+
design mode (editor collapsed). KeyBindingManager uses this to decide
71+
whether a keyboard shortcut should fire; commands that don't opt in are
72+
swallowed in design mode.
73+
6474
**Kind**: instance method of [<code>Command</code>](#Command)
6575
<a name="Command+setEnabled"></a>
6676

@@ -165,6 +175,7 @@ Registers a global command.
165175
| [options] | <code>Object</code> | |
166176
| options.eventSource | <code>boolean</code> | If set to true, the commandFn will be called with the first argument `event` with details about the source(invoker) as event.eventSource(one of the `CommandManager.SOURCE_*`) and event.sourceType(Eg. Ctrl-K) parameter. |
167177
| options.htmlName | <code>string</code> | If set, this will be displayed in ui menus instead of the name given. Example: `"Phoenix menu<i class='fa fa-car' style='margin-left: 4px;'></i>"` |
178+
| options.supportsDesignMode | <code>boolean</code> | If true, this command's keyboard shortcut will still fire when the workspace is in design mode. Commands that don't opt in are swallowed in design mode because the editor area is collapsed and most shortcuts are nonsensical there. Reserve this flag for commands that remain useful with no editor visible (file open/save/close, Quick Open, Find in Files, etc.). |
168179

169180
<a name="registerInternal"></a>
170181

0 commit comments

Comments
 (0)