changeset 38908 | f0c186d76c8a |
parent 38541 | 44e95493fd13 |
child 38909 | 80e42e2d475b |
--- a/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/ConsoleIOContext.java Wed Jul 05 21:49:00 2017 +0200 +++ b/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/ConsoleIOContext.java Wed Jun 08 00:32:31 2016 -0700 @@ -93,7 +93,7 @@ .collect(Collectors.toList()); in.setHistory(history = new EditingHistory(in, persistenHistory) { @Override protected boolean isComplete(CharSequence input) { - return repl.analysis.analyzeCompletion(input.toString()).completeness.isComplete; + return repl.analysis.analyzeCompletion(input.toString()).completeness().isComplete(); } }); in.setBellEnabled(true); @@ -117,24 +117,24 @@ boolean smart = allowSmart && suggestions.stream() - .anyMatch(s -> s.isSmart); + .anyMatch(s -> s.matchesType()); lastTest = test; lastCursor = cursor; allowSmart = !allowSmart; suggestions.stream() - .filter(s -> !smart || s.isSmart) - .map(s -> s.continuation) + .filter(s -> !smart || s.matchesType()) + .map(s -> s.continuation()) .forEach(result::add); boolean onlySmart = suggestions.stream() - .allMatch(s -> s.isSmart); + .allMatch(s -> s.matchesType()); if (smart && !onlySmart) { Optional<String> prefix = suggestions.stream() - .map(s -> s.continuation) + .map(s -> s.continuation()) .reduce(ConsoleIOContext::commonPrefix); String prefixStr = prefix.orElse("").substring(cursor - anchor[0]);