RFR 8143006: JShell tool: EditPad doesn't process each line as same as inputs for jshell
Robert Field
robert.field at oracle.com
Sat Nov 14 17:43:26 UTC 2015
Thanks for catching this.
You make a good point that it is not processed like other input. Can we factor out and share code so that it is processed with the same code?
List adds missing semicolons, can we share mechanism there.
The pre-existing approach where cmdEdit builds up the snippet list and the src, then the further processing is in SaveHandler seems worrisome — not to mention it forces you to interrupt the pretty stream sequencing you built.
Thanks,
Robert
> On Nov 14, 2015, at 9:05 AM, ShinyaYoshida <bitterfoxc at gmail.com> wrote:
>
> Hi,
> I'd like to change the behavior of SaveHandler.
>
> When I put following into EditPad, it makes an error:
>
> System.out.println("Hello")
> System.out.println("World")
> --
> | Error:
> | ';'がありません
> | System.out.println("hello")
> | ^
>
> It is very confusing and useless.
> Because when I open EditPad after running "System.out.println("Hello")" on
> jshell, the text in EditPad contains "System.out.println("Hello")" and it
> could be cause of error after several editing.
> (it is only happen when the invoked method returns void because
> JShell#cmdEdit don't put ";" to the end of statements.)
>
> And, above all, the user will be surprised at the input for EditPad because
> it is not processed like the input for jshell.
>
> Could you review this?
> http://cr.openjdk.java.net/~shinyafox/kulla/8143006/webrev.00/
>
> Bugs is here:
> https://bugs.openjdk.java.net/browse/JDK-8143006
>
> Regards,
> shinyafox(Shinya Yoshida)
More information about the kulla-dev
mailing list