org.crsh.console
Class Mode
java.lang.Object
org.crsh.console.Mode
- Direct Known Subclasses:
- Mode.ChangeChar, Mode.Digit
public abstract class Mode
- extends Object
The current mode of the editor state machine. It decodes a command line operation according
to the current status and its possible state and provide an editor action that will modify the
state of the editor.
- Author:
- Julien Viet
|
Constructor Summary |
Mode()
|
|
Method Summary |
abstract String |
getKeyMap()
|
org.crsh.console.EditorAction |
on(org.crsh.console.KeyStroke keyStroke)
Transform a key stroke into a editor action. |
org.crsh.console.EditorAction |
repeat(int count)
|
org.crsh.console.EditorAction |
then(org.crsh.console.EditorAction action)
|
abstract String |
toString()
|
EMACS
public static final Mode EMACS
VI_INSERT
public static final Mode VI_INSERT
VI_MOVE
public static final Mode VI_MOVE
DELETE_TO
public static final Mode DELETE_TO
CHANGE_TO
public static final Mode CHANGE_TO
YANK_TO
public static final Mode YANK_TO
Mode
public Mode()
getKeyMap
public abstract String getKeyMap()
toString
public abstract String toString()
- Overrides:
toString in class Object
on
public org.crsh.console.EditorAction on(org.crsh.console.KeyStroke keyStroke)
- Transform a key stroke into a editor action. If no action must be taken, null should be returned.
- Parameters:
keyStroke - the key stroke
- Returns:
- the editor action
then
public org.crsh.console.EditorAction then(org.crsh.console.EditorAction action)
repeat
public org.crsh.console.EditorAction repeat(int count)
Copyright © 2015 eXo Platform SAS. All Rights Reserved.