-
Notifications
You must be signed in to change notification settings - Fork 951
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
upgrade to jline 2.10, jansi 1.10 and jna 3.5.2
- Loading branch information
1 parent
28fab23
commit 83197dd
Showing
13 changed files
with
131 additions
and
163 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
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
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
76 changes: 76 additions & 0 deletions
76
grails-bootstrap/src/main/groovy/grails/build/interactive/completors/StringsCompleter.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
/* Copyright 2012 the original author or authors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package grails.build.interactive.completors; | ||
|
||
import jline.console.completer.Completer; | ||
|
||
import java.util.*; | ||
|
||
import static jline.internal.Preconditions.checkNotNull; | ||
|
||
/** | ||
* @author Graeme Rocher | ||
*/ | ||
public class StringsCompleter | ||
implements Completer | ||
{ | ||
private SortedSet<String> strings = new TreeSet<String>(); | ||
|
||
public StringsCompleter() { | ||
// empty | ||
} | ||
|
||
public StringsCompleter(final Collection<String> strings) { | ||
checkNotNull(strings); | ||
getStrings().addAll(strings); | ||
} | ||
|
||
public StringsCompleter(final String... strings) { | ||
this(Arrays.asList(strings)); | ||
} | ||
|
||
public SortedSet<String> getStrings() { | ||
return strings; | ||
} | ||
|
||
|
||
public void setStrings(SortedSet<String> strings) { | ||
this.strings = strings; | ||
} | ||
|
||
public int complete(final String buffer, final int cursor, final List<CharSequence> candidates) { | ||
// buffer could be null | ||
checkNotNull(candidates); | ||
|
||
if (buffer == null) { | ||
candidates.addAll(getStrings()); | ||
} | ||
else { | ||
for (String match : getStrings().tailSet(buffer)) { | ||
if (!match.startsWith(buffer)) { | ||
break; | ||
} | ||
|
||
candidates.add(match); | ||
} | ||
} | ||
|
||
if (candidates.size() == 1) { | ||
candidates.set(0, candidates.get(0) + " "); | ||
} | ||
|
||
return candidates.isEmpty() ? -1 : 0; | ||
} | ||
} |
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
104 changes: 0 additions & 104 deletions
104
grails-bootstrap/src/main/groovy/grails/build/logging/PatchedJLineWindowsTerminal.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.