Permalink
Show file tree
Hide file tree
1 comment
on commit
sign in to comment.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
47 changed files
with
2,194 additions
and
837 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -137,4 +137,9 @@ public boolean complete() { | ||
public int compareTo(Candidate o) { | ||
return value.compareTo(o.value); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "Candidate{" + value + "}"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,48 @@ | ||
/* | ||
* Copyright (c) 2002-2020, the original author or authors. | ||
* | ||
* This software is distributable under the BSD license. See the terms of the | ||
* BSD license in the documentation provided with this software. | ||
* | ||
* https://opensource.org/licenses/BSD-3-Clause | ||
*/ | ||
package jdk.internal.org.jline.reader; | ||
|
||
import java.util.List; | ||
import java.util.Map; | ||
|
||
public interface CompletionMatcher { | ||
|
||
/** | ||
* Compiles completion matcher functions | ||
* | ||
* @param options LineReader options | ||
* @param prefix invoked by complete-prefix or expand-or-complete-prefix widget | ||
* @param line The parsed line within which completion has been requested | ||
* @param caseInsensitive if completion is case insensitive or not | ||
* @param errors number of errors accepted in matching | ||
* @param originalGroupName value of JLineReader variable original-group-name | ||
*/ | ||
void compile(Map<LineReader.Option, Boolean> options, boolean prefix, CompletingParsedLine line | ||
, boolean caseInsensitive, int errors, String originalGroupName); | ||
|
||
/** | ||
* | ||
* @param candidates list of candidates | ||
* @return a map of candidates that completion matcher matches | ||
*/ | ||
List<Candidate> matches(List<Candidate> candidates); | ||
|
||
/** | ||
* | ||
* @return a candidate that have exact match, null if no exact match found | ||
*/ | ||
Candidate exactMatch(); | ||
|
||
/** | ||
* | ||
* @return a common prefix of matched candidates | ||
*/ | ||
String getCommonPrefix(); | ||
|
||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
b8cb76a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review
Issues