org.crsh.console
Class Mode
java.lang.Object
org.crsh.console.EditorAction
org.crsh.console.Mode
- Direct Known Subclasses:
- Mode.ChangeChar, Mode.Digit
-
public abstract class Mode
- extends EditorAction
-
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
Fields inherited from class org.crsh.console.EditorAction |
CHANGE_CASE, CLS, COMPLETE, COPY, COPY_BEGINNING_OF_LINE, COPY_END_OF_LINE, COPY_NEXT_WORD, COPY_PREV_WORD, DELETE_BEGINNING, DELETE_END, DELETE_LINE, DELETE_NEXT_CHAR, DELETE_NEXT_WORD, DELETE_PREV_CHAR, DELETE_PREV_WORD, DELETE_UNTIL_NEXT_WORD, ENTER, EOF_MAYBE, HISTORY_FIRST, HISTORY_LAST, HISTORY_NEXT, HISTORY_PREV, INSERT_COMMENT, INTERRUPT, LEFT, MOVE_BEGINNING, MOVE_END, MOVE_NEXT_WORD_AFTER_END, MOVE_NEXT_WORD_AT_BEGINNING, MOVE_NEXT_WORD_BEFORE_END, MOVE_PREV_WORD_AT_BEGINNING, MOVE_PREV_WORD_AT_END, PASTE_AFTER, RIGHT, TRANSPOSE_CHARS, UNIX_LINE_DISCARD |
Constructor Summary |
Mode()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
log
private static final Logger log
-
The logger.
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
-
perform
void perform(Editor editor,
EditorBuffer buffer)
throws IOException
-
- Overrides:
perform
in class EditorAction
-
- Throws:
IOException
on
public EditorAction on(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
Copyright © 2015 eXo Platform SAS. All Rights Reserved.