RFR: 8133549: Generalize jshell's EditingHistory

Robert Field robert.field at oracle.com
Fri May 13 17:18:57 UTC 2016


Thumbs up on langtools changes

-Robert

On 05/12/16 03:25, Jan Lahoda wrote:
> Hello,
>
> In jshell, there's a special history mode that is intended to aid with 
> editing/re-entering multi-line snippets (EditingHistory). It works 
> like this: when the user goes back through the history to the first 
> line of a multi-line snippet, and enters/confirms that line, the 
> history view is limited only to the given snippet. I.e. up and down 
> arrows won't go through the whole history, but only the few lines of 
> the given snippet. When the multi-line snippet is finished, the 
> history is restored to the original full state.
>
> The proposal here is to generalize this history mode so that it can be 
> used in jjs as well. For this, a new support class is added into 
> jdk.internal.le, that implements this history. Also, ConsoleReader is 
> extended to also accept actions as a Runnable instead of only 
> ActionListener, so that the EditingHistory can add extra actions to 
> jump by the whole snippets when going back in history.
>
> Bug:
> https://bugs.openjdk.java.net/browse/JDK-8133549
>
> Webrev:
> jdk repository:
> http://cr.openjdk.java.net/~jlahoda/8133549/jdk/webrev.00/
>
> langtools repository:
> http://cr.openjdk.java.net/~jlahoda/8133549/langtools/webrev.00/
>
> nashorn repository:
> http://cr.openjdk.java.net/~jlahoda/8133549/nashorn/webrev.00/
>
> Any comments are welcome!
>
> Thanks,
>     Jan



More information about the kulla-dev mailing list