JShell feedback
Jan Lahoda
jan.lahoda at oracle.com
Thu Apr 7 16:39:03 UTC 2016
Hi Anthony,
Thanks for the comments.
On 7.4.2016 12:33, Anthony Vanelverdinghe wrote:
> Hi
>
> Here's my feedback after some initial jshell experiments:
>
> ** what's an unresolvable identifier (in the context of "<fix-shortcut>
> i")? I expected the following:
> -> PI<fix-shortcut> i
> would result in a proposal to change it to Math.PI, but it doesn't.
> Actually, I haven't been able to make this shortcut do anything at all
> yet (using "cmd" on Windows 7 and JDK 9-ea+111). What's an example usage
> of this shortcut?
For Windows, this is needed:
https://bugs.openjdk.java.net/browse/JDK-8147984
but not approved yet.
But, this feature currently only works for on classes, e.g. it should be
able to fill in import for e.g.
java.util.concurrent.atomic.AtomicInteger. My concern here is that if we
will scan class members, the time needed by the scanning might be too big.
>
> The following are issues/RFEs I've come across. If you'd rather have me
> file these through bugs.java.com, just let me know.
>
> ** consider the following sequence:
> -> double a = 2<enter>
> -> Math.sin(<tab>
> -> <9x backspace>3
> -> double b = 4<enter>
> -> double c = 5<enter>
> -> Math.sin(<tab>
> then at this point it immediately asks me if I want to display all
> possibilities:
> -> Math.sin(Display all 457 possibilities? (y or n)
> instead of proposing me the short list again first (now with a, b, c and
> the temporary variable). The same is true if, instead of "<9x
> backspace>3", I do "<Ctrl+C>" to cancel the command.
I've filled:
https://bugs.openjdk.java.net/browse/JDK-8153759
>
> ** when I do "Math.sin(<tab><tab>" and get:
> -> Math.sin(Display all 455 possibilities? (y or n)
> I'm unable to cancel the command with "<Ctrl+C>" directly
I've filled:
https://bugs.openjdk.java.net/browse/JDK-8153760
I'll see what can be done (this is jline behavior).
>
> ** when doing Shift-<tab>, it would be useful if the actual parameter
> names were shown. For this, the classes would need to have been compiled
> with "-parameters" though. For methods defined through jshell, I guess
> this ought to be possible since jshell handles the compilation itself.
> Apparently, JDKs and JREs currently don't provide parameter info, though
> I think they should for jshell's sake: having meaningful parameter names
> readily available can save a round trip to the Javadocs, which I feel is
> important in a REPL environment.
I've filled:
https://bugs.openjdk.java.net/browse/JDK-8153761
>
> ** it would be nice to have a command (such as Windows' "/cls") and/or
> shortcut (such as Bash' "Ctrl+L") to clear the screen
I've filled:
https://bugs.openjdk.java.net/browse/JDK-8153762
But this might be tricky, esp. on Windows.
Thanks,
Jan
>
> Kind regards,
> Anthony
More information about the kulla-dev
mailing list