public class AceCommandDescription
extends java.lang.Object
AceEditor.execCommand(String)
API calls).Modifier and Type | Class and Description |
---|---|
static interface |
AceCommandDescription.ExecAction
Ace command execution action.
|
static class |
AceCommandDescription.KeyBinding
Key binding description.
|
static class |
AceCommandDescription.MultiSelectAction
Action defines a way of running commands based on editor text selection.
|
static class |
AceCommandDescription.ScrollIntoView
Ace command scrolling options.
|
Constructor and Description |
---|
AceCommandDescription(java.lang.String name,
AceCommandDescription.ExecAction exec)
Define Ace command with command line name and execution action
|
Modifier and Type | Method and Description |
---|---|
static AceCommandDescription |
fromJavaScript(com.google.gwt.core.client.JavaScriptObject obj)
Create Ace command from javascript object.
|
java.lang.String |
getAceCommandGroup()
Give Ace command group name of this command.
|
AceCommandDescription.KeyBinding |
getBindKey()
Give key bindings.
|
AceCommandDescription.ExecAction |
getExec()
Give execution action of this command.
|
AceCommandDescription.MultiSelectAction |
getMultiSelectAction()
Give multi-select action for this command.
|
java.lang.String |
getName()
Give command line name.
|
AceCommandDescription.ScrollIntoView |
getScrollIntoView()
Give scroll settings for this command.
|
boolean |
isPassEvent()
In case this parameter is true keyboard event will be passed to
original listener.
|
boolean |
isReadOnly()
Describe does this command change editor document or not.
|
com.google.gwt.core.client.JavaScriptObject |
toJavaScript(AceEditor editor)
Create javascript object from Ace command description.
|
java.lang.String |
toString() |
AceCommandDescription |
withAceCommandGroup(java.lang.String aceCommandGroup)
Chainable setter method for aceCommandGroup property.
|
AceCommandDescription |
withBindKey(AceCommandDescription.KeyBinding bindKey)
Chainable setter method for bindKey property.
|
AceCommandDescription |
withBindKey(java.lang.String bindKeyForAllPlatforms)
Chainable setter method for bindKey property for all platforms.
|
AceCommandDescription |
withBindKey(java.lang.String bindKeyForAllPlatformsExceptMac,
java.lang.String bindKeyForMac)
Chainable setter method for bindKey property for Mac and other platforms separately.
|
AceCommandDescription |
withMultiSelectAction(AceCommandDescription.MultiSelectAction multiSelectAction)
Chainable setter method for multiSelectAction property.
|
AceCommandDescription |
withPassEvent(boolean passEvent)
Chainable setter method for passEvent property.
|
AceCommandDescription |
withReadOnly(boolean readOnly)
Chainable setter method for readOnly property.
|
AceCommandDescription |
withScrollIntoView(AceCommandDescription.ScrollIntoView scrollIntoView)
Chainable setter method for scrollIntoView property.
|
public AceCommandDescription(java.lang.String name, AceCommandDescription.ExecAction exec)
name
- command line nameexec
- execution actionpublic java.lang.String getName()
public AceCommandDescription.ExecAction getExec()
public AceCommandDescription.KeyBinding getBindKey()
public boolean isReadOnly()
public boolean isPassEvent()
public AceCommandDescription.ScrollIntoView getScrollIntoView()
AceCommandDescription.ScrollIntoView
for details.public AceCommandDescription.MultiSelectAction getMultiSelectAction()
AceCommandDescription.MultiSelectAction
for details.public java.lang.String getAceCommandGroup()
public AceCommandDescription withBindKey(AceCommandDescription.KeyBinding bindKey)
bindKey
- key binding (e.g. "shift-esc|ctrl-`" or "Command+Alt+C")public AceCommandDescription withBindKey(java.lang.String bindKeyForAllPlatforms)
bindKeyForAllPlatforms
- key binding (e.g. "shift-esc|ctrl-`" or "Command+Alt+C")public AceCommandDescription withBindKey(java.lang.String bindKeyForAllPlatformsExceptMac, java.lang.String bindKeyForMac)
bindKeyForAllPlatformsExceptMac
- key binding for everything except Mac (e.g. "shift-esc|ctrl-`")bindKeyForMac
- key binding for Mac (e.g. "shift-esc|ctrl-`" or "Command+Alt+C")public AceCommandDescription withReadOnly(boolean readOnly)
readOnly
- describes does this command change editor document or notpublic AceCommandDescription withPassEvent(boolean passEvent)
passEvent
- in case it's true keyboard event will not be stopped
and will be passed to original listener after command executionpublic AceCommandDescription withScrollIntoView(AceCommandDescription.ScrollIntoView scrollIntoView)
scrollIntoView
- scroll settings for this command (in case it's
null command is executed without scroll adjustment; otherwise
see AceCommandDescription.ScrollIntoView
for details)public AceCommandDescription withMultiSelectAction(AceCommandDescription.MultiSelectAction multiSelectAction)
multiSelectAction
- multi-select action for this command (in
case it's null command is executed once without virtual changes
in selection ranges; otherwise see AceCommandDescription.MultiSelectAction
for
details)public AceCommandDescription withAceCommandGroup(java.lang.String aceCommandGroup)
aceCommandGroup
- Ace command group name of this commandpublic java.lang.String toString()
toString
in class java.lang.Object
public static AceCommandDescription fromJavaScript(com.google.gwt.core.client.JavaScriptObject obj)
obj
- javascript object describing Ace commandpublic com.google.gwt.core.client.JavaScriptObject toJavaScript(AceEditor editor)
editor
- Ace editor java wrapper