Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,14 @@
*/
public class CompositeSuggestionProvider implements SuggestionProvider {

/** Field. */
private final SuggestionProvider[] providers;

/**
* Constructor.
*
* @param providers the suggestion providers to chain
*/
public CompositeSuggestionProvider(SuggestionProvider... providers) {
this.providers = providers;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@
*/
public class KeyMappingTrie {

/** Constructor. */
public KeyMappingTrie() {
}

private final TrieNode root = new TrieNode();

// Pre-computed single-byte lookups for fast path
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
*/
public class BeginningOfHistory implements Action {

/** Constructor. */
public BeginningOfHistory() {
}

@Override
public String name() {
return "beginning-of-history";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
*/
public class CharacterSearch implements ActionEvent {

/** Constructor. */
public CharacterSearch() {
}

private boolean waitingForInput = false;
private int searchChar = -1;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
*/
public class CharacterSearchBackward implements ActionEvent {

/** Constructor. */
public CharacterSearchBackward() {
}

private boolean waitingForInput = false;
private int searchChar = -1;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@
*/
public class DeleteCharOrList implements Action {

/** Constructor. */
public DeleteCharOrList() {
}

@Override
public String name() {
return "delete-char-or-list";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
*/
public class DeleteHorizontalSpace implements Action {

/** Constructor. */
public DeleteHorizontalSpace() {
}

@Override
public String name() {
return "delete-horizontal-space";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
*/
public class EndOfHistory implements Action {

/** Constructor. */
public EndOfHistory() {
}

@Override
public String name() {
return "end-of-history";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
*/
public class ExchangePointAndMark implements Action {

/** Constructor. */
public ExchangePointAndMark() {
}

@Override
public String name() {
return "exchange-point-and-mark";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@
*/
public class HistorySearchBackward implements Action {

/** Constructor. */
public HistorySearchBackward() {
}

private int searchIndex = -1;

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@
*/
public class HistorySearchForward implements Action {

/** Constructor. */
public HistorySearchForward() {
}

private int searchIndex = -1;

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
*/
public class InsertComment implements Action {

/** Constructor. */
public InsertComment() {
}

@Override
public String name() {
return "insert-comment";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@
*/
public class KillRegion implements Action {

/** Constructor. */
public KillRegion() {
}

@Override
public String name() {
return "kill-region";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@
*/
public class NonIncrementalForwardSearchHistory extends NonIncrementalSearchHistory {

/** Search prompt. */
private static final int[] PROMPT = Parser.toCodePoints("(forward-search): ");

/** Constructor. */
public NonIncrementalForwardSearchHistory() {
super(SearchDirection.FORWARD, PROMPT);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@
*/
public class NonIncrementalReverseSearchHistory extends NonIncrementalSearchHistory {

/** Search prompt. */
private static final int[] PROMPT = Parser.toCodePoints("(reverse-search): ");

/** Constructor. */
public NonIncrementalReverseSearchHistory() {
super(SearchDirection.REVERSE, PROMPT);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
*/
public class OverwriteMode implements Action {

/** Constructor. */
public OverwriteMode() {
}

@Override
public String name() {
return "overwrite-mode";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
*/
public class PossibleCompletions implements Action {

/** Constructor. */
public PossibleCompletions() {
}

@Override
public String name() {
return "possible-completions";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
*/
public class QuotedInsert implements ActionEvent {

/** Constructor. */
public QuotedInsert() {
}

private boolean waitingForInput = false;
private int[] storedKey = null;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
*/
public class RedrawCurrentLine implements Action {

/** Constructor. */
public RedrawCurrentLine() {
}

@Override
public String name() {
return "redraw-current-line";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
*/
public class RevertLine implements Action {

/** Constructor. */
public RevertLine() {
}

@Override
public String name() {
return "revert-line";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
*/
public class SetMark implements Action {

/** Constructor. */
public SetMark() {
}

@Override
public String name() {
return "set-mark";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
*/
public class TildeExpand implements Action {

/** Constructor. */
public TildeExpand() {
}

@Override
public String name() {
return "tilde-expand";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
*/
public class TransposeChars implements Action {

/** Constructor. */
public TransposeChars() {
}

@Override
public String name() {
return "transpose-chars";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
*/
public class TransposeWords implements Action {

/** Constructor. */
public TransposeWords() {
}

@Override
public String name() {
return "transpose-words";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@
*/
public class UnixFilenameRubout implements Action {

/** Constructor. */
public UnixFilenameRubout() {
}

@Override
public String name() {
return "unix-filename-rubout";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
*/
public class YankLastArg implements Action {

/** Constructor. */
public YankLastArg() {
}

@Override
public String name() {
return "yank-last-arg";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@
*/
public class YankNthArg implements Action {

/** Constructor. */
public YankNthArg() {
}

@Override
public String name() {
return "yank-nth-arg";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
*/
public class YankPop implements Action {

/** Constructor. */
public YankPop() {
}

private int killRingIndex = 0;

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ public void setClipboardWriter(Consumer<int[]> clipboardWriter) {
this.clipboardWriter = clipboardWriter;
}

/**
* Add text to the paste stack.
*
* @param buffer the text to add
*/
public void addText(int[] buffer) {
checkSize();
pasteStack.add(buffer);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,23 @@
*/
public abstract class AbstractConnection implements Connection {

/** Field. */
protected EventDecoder eventDecoder;
/** Field. */
protected Consumer<int[]> stdout;
/** Field. */
protected Consumer<Size> sizeHandler;
/** Field. */
protected Consumer<Void> closeHandler;
/** Field. */
protected Attributes attributes;
/** Field. */
protected volatile boolean reading;

/** Constructor. */
protected AbstractConnection() {
}

private TerminalFeatures terminalFeatures;

@Override
Expand Down
21 changes: 21 additions & 0 deletions terminal-api/src/main/java/org/aesh/terminal/Device.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ enum OscCode {
this.code = code;
}

/**
* Method.
*
* @return the value
*/
public int getCode() {
return code;
}
Expand Down Expand Up @@ -203,14 +208,30 @@ enum TerminalType {
this.supportsSynchronizedOutput = supportsSynchronizedOutput;
}

/**
* Method.
*
* @return the value
*/
public String getIdentifier() {
return identifier;
}

/**
* Method.
*
* @return the supported codes
*/
public Set<OscCode> getSupportedCodes() {
return supportedCodes;
}

/**
* Method.
*
* @param code the code to check
* @return the value
*/
public boolean supports(OscCode code) {
return supportedCodes.contains(code);
}
Expand Down
Loading
Loading