RFR 8143006: JShell tool: EditPad doesn't process each line as same as inputs for jshell
ShinyaYoshida
bitterfoxc at gmail.com
Mon Nov 16 02:32:32 UTC 2015
Hi,
I have another fix, please review this.
I think this is better than before.
http://cr.openjdk.java.net/~shinyafox/kulla/8143006/webrev.01/
In this patch, SaveHandler calls JShellTool#run.
So it commits itself to deal with the code like /open or normal jshell
input.
Regards,
shinyafox(Shinya Yoshida)
2015-11-15 2:43 GMT+09:00 Robert Field <robert.field at oracle.com>:
> 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