JDK-8133948 : Add 'edit' function to allow external editing of scripts
Type:Sub-task
Component:core-libs
Sub-Component:jdk.nashorn
Affected Version:9
Priority:P3
Status:Resolved
Resolution:Fixed
OS:generic
CPU:generic
Submitted:2015-08-19
Updated:2015-09-10
Resolved:2015-08-21
The Version table provides details related to the release that this issue/RFE will be addressed.
Unresolved : Release in which this issue/RFE will be addressed. Resolved: Release in which this issue/RFE has been resolved. Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.
'edit' top level function may allow external editing of scripts - external editor could be operating system executable configured or a simple swing edit pad. This is similar to /edit command of jshell.
Comments
jjs> edit(func)
will open the editor with the current code function func. You can pass any string as initial code as well.
19-08-2015
Configuring external editor could be done by via "editor" property of "edit" function.
jjs> edit.editor = "notepad";
jjs> edit();