RFR 8133347: Add makefiles support and basic session, persistence history navigation with jline
sundararajan.athijegannathan at oracle.com
Thu Aug 13 12:46:10 UTC 2015
Yes, I took that part of code from jshell code - hoped that I can do
multiline editing support + history on that for jjs later. But, you're
right. For now, it is better to have a simpler history code in Console
as you suggested.
Also if we want more common code, perhaps jdk.internal.le could have
abstract classes shared b/w jshell and jjs (later).
I've updated Console with your simpler history implementation. Updated
On 8/13/2015 3:37 PM, Jan Lahoda wrote:
> Hi Sundar,
> Regarding the new Console.java, there is a copy of EditingHistory from
> JShell. That implements a support for simpler editing of multi-line
> snippet from history (still somewhat experimental, I think). If that
> would be useful for jjs, then I think we(/I) should work on sharing
> that code between jjs and jshell.
> If just a simple persistent history would be desired, then it can be
> simpler, I think. Persistence to Preferences could be done like this:
> Persistence to a file could be done using JLine's FileHistory.
> Otherwise, looks OK to me (although I am not an expert on the build
> system changes, etc.)
> On 12.8.2015 19:03, Sundararajan Athijegannathan wrote:
>> Please review changes for the bug:
>> This is a subtask of "jjs should use jline"
>> This subtask addresses infrastructure changes (module.xml, makefiles,
>> security policy) and basic jjs use of jline. In session command history
>> and persistent history are implemented. Old jjs main class
>> jdk.nashorn.tools.Shell is still available and that can be used on
>> non-desktop platforms such as "compact1". The new "jjs" main class is
>> jdk.nashorn.tools.jjs.Main subclasses Shell and adds only support for
>> interactive mode using jline internal API.
>> jdk9-dev "top" repo webrev:
>> "jdk" repo webrev:
>> "nashorn" repo webrev:
More information about the nashorn-dev