RFR: JDK-8189595: jshell tool: line redrawn on each completion
Robert Field
robert.field at oracle.com
Fri Oct 27 17:14:29 UTC 2017
As is, there are a couple of nits: "hasSmart && hasBoth" is redundant,
"hasBoth" implies "hasSmart". And with the approach, the last parameter
of the OrdinaryCompletionTask constructor is incorrectly named.
However, to the extent this fix works, it works by changing the behavior of:
494 boolean showItems = toShow.size() > 1 || smart;
But I think this is the wrong test to be making. Rather, I think, what
needs to be tested is whether putting the prefixStr completes the
completion.
Example, before and after the fix:
jshell> int zxgrr
zxgrr ==> 0
jshell> double zxgrr() { return 0; }
| created method zxgrr()
jshell> int x = zx<tab>
Yields a completion with "grr" and a show:
jshell> int x = zxgrr
zxgrr
jshell> int x = zxgr
-Robert
On 10/26/17 10:49, Jan Lahoda wrote:
> Hi,
>
> Please review fix:
> http://cr.openjdk.java.net/~jlahoda/8189595/webrev.00/
>
> For bug:
> https://bugs.openjdk.java.net/browse/JDK-8189595
>
> Thanks,
> Jan
More information about the kulla-dev
mailing list