More fix around suggestions for the multi-line code.
Jan Lahoda
jan.lahoda at oracle.com
Thu Mar 26 16:23:12 UTC 2015
Hi Shinya,
Thanks for the report and patch. Thinking about this, I was not sure if
making ConsoleIOContext more dependent on details in the Repl class is a
good direction. I think it may be better to simply pass the current
"prefix" (incomplete String) into the IOContext.readLine - any
particular IOContext may then decide what to do with the current prefix.
This would avoid tight coupling between ConsoleIOContext and Repl classes.
A patch implementing that is attached - what do you think?
Thanks,
Jan
On 26.3.2015 14:01, ShinyaYoshida wrote:
> Hi Jan,
> Thank you for your pushing my patch.
>
> I have more patch around suggestions for the multi-line code.
>
> Please review my patch.
> webrev: http://cr.openjdk.java.net/~shinyafox/kulla/201503262/webrev.00/
>
> 1. Find suggestions, considering the incompleting code:
>
> Currently, REPL prints all suggestions for the following code:
>
> ----
> ->"".
>>> [TAB]Display all 446 possibilities? (y or n)
> ----
>
> But, it should print members of String class.
>
> ----
> ->"".
>>> [TAB]
>
> CASE_INSENSITIVE_ORDER String( charAt( etc...
> ----
>
> 2. Don't print a command documentation in the multi-line code:
>
> Currently, REPL prints the command documentation in the multi-line code.
>
> ----
> ->"".
>>> /list all[SHIFT+TAB]
> list the source you have typed
> ----
>
> But, it shouldn't print the command documentation.
>
> 3. Print method documentation in multi-line code:
>
> Currently, REPL don't print the method documentation in the multi-line code.
> But, it should print the method documentation such as following:
>
> ----
> ->"".
>>> split([SHIFt+TAB]
> java.lang.String.split(java.lang.String arg0, int arg1)
> java.lang.String.split(java.lang.String arg0)
> ----
>
> Regards,
> shinyafox(Shinya Yoshida)
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: context-read-line-prefix.diff
Type: text/x-patch
Size: 3392 bytes
Desc: not available
URL: <http://mail.openjdk.java.net/pipermail/kulla-dev/attachments/20150326/3c8e8f0e/context-read-line-prefix.diff>
More information about the kulla-dev
mailing list