Skip to content

Commit f1a15a4

Browse files
committedJan 11, 2022
8273682: Upgrade Jline to 3.20.0
Backport-of: b8cb76ad210cb3e7524c7f5b13cfe57746ac05d4
1 parent 1c7af7e commit f1a15a4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+2194
-837
lines changed
 

‎src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/Candidate.java

+5
Original file line numberDiff line numberDiff line change
@@ -137,4 +137,9 @@ public boolean complete() {
137137
public int compareTo(Candidate o) {
138138
return value.compareTo(o.value);
139139
}
140+
141+
@Override
142+
public String toString() {
143+
return "Candidate{" + value + "}";
144+
}
140145
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/*
2+
* Copyright (c) 2002-2020, the original author or authors.
3+
*
4+
* This software is distributable under the BSD license. See the terms of the
5+
* BSD license in the documentation provided with this software.
6+
*
7+
* https://opensource.org/licenses/BSD-3-Clause
8+
*/
9+
package jdk.internal.org.jline.reader;
10+
11+
import java.util.List;
12+
import java.util.Map;
13+
14+
public interface CompletionMatcher {
15+
16+
/**
17+
* Compiles completion matcher functions
18+
*
19+
* @param options LineReader options
20+
* @param prefix invoked by complete-prefix or expand-or-complete-prefix widget
21+
* @param line The parsed line within which completion has been requested
22+
* @param caseInsensitive if completion is case insensitive or not
23+
* @param errors number of errors accepted in matching
24+
* @param originalGroupName value of JLineReader variable original-group-name
25+
*/
26+
void compile(Map<LineReader.Option, Boolean> options, boolean prefix, CompletingParsedLine line
27+
, boolean caseInsensitive, int errors, String originalGroupName);
28+
29+
/**
30+
*
31+
* @param candidates list of candidates
32+
* @return a map of candidates that completion matcher matches
33+
*/
34+
List<Candidate> matches(List<Candidate> candidates);
35+
36+
/**
37+
*
38+
* @return a candidate that have exact match, null if no exact match found
39+
*/
40+
Candidate exactMatch();
41+
42+
/**
43+
*
44+
* @return a common prefix of matched candidates
45+
*/
46+
String getCommonPrefix();
47+
48+
}

0 commit comments

Comments
 (0)