langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/resources/l10n.properties
changeset 41635 cb3d04878117
parent 41514 a75c2b869d8d
child 41641 a628785b9dd9
--- a/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/resources/l10n.properties	Wed Oct 19 16:58:09 2016 -0700
+++ b/langtools/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/resources/l10n.properties	Thu Oct 20 12:53:11 2016 -0700
@@ -52,12 +52,17 @@
 
 jshell.err.no.such.command.or.snippet.id = No such command or snippet id: {0}
 jshell.err.command.ambiguous = Command: ''{0}'' is ambiguous: {1}
-jshell.err.set.editor.arg = The ''/set editor'' command requires a path argument
 jshell.msg.set.editor.set = Editor set to: {0}
+jshell.msg.set.editor.retain = Editor setting retained: {0}
 jshell.err.cant.launch.editor = Cannot launch editor -- unexpected exception: {0}
 jshell.msg.try.set.editor = Try /set editor to use external editor.
 jshell.msg.press.return.to.leave.edit.mode = Press return to leave edit mode.
-jshell.err.wait.applies.to.external.editor = -wait applies to external editors, cannot be used with -default
+jshell.err.wait.applies.to.external.editor = -wait applies to external editors
+
+jshell.err.setting.to.retain.must.be.specified = The setting to retain must be specified -- {0}
+jshell.msg.set.show.mode.settings = \nTo show mode settings use ''/set prompt'', ''/set truncation'', ...\n\
+or use ''/set mode'' followed by the feedback mode name.
+jshell.err.continuation.prompt.required = Continuation prompt required -- {0}
 
 jshell.msg.try.command.without.args = Try ''{0}'' without arguments.
 jshell.msg.no.active = There are no active definitions.
@@ -104,12 +109,10 @@
 jshell.err.mode.name = Expected a feedback mode name: {0}
 jshell.err.missing.mode = Missing the feedback mode -- {0}
 jshell.err.field.name = Expected a field name: {0} -- {1}
-jshell.err.missing.field = Missing the field name -- {0}
 jshell.err.mode.unknown = No feedback mode named: {0} -- {1}
 
 jshell.err.feedback.does.not.match.mode = Does not match any current feedback mode: {0} -- {1}
 jshell.err.feedback.ambiguous.mode = Matches more then one current feedback mode: {0} -- {1}
-jshell.err.feedback.expected.format = Expected format missing -- {0}
 jshell.err.feedback.must.be.quoted = Format ''{0}'' must be quoted -- {1}
 jshell.err.feedback.not.a.valid.selector = Not a valid selector ''{0}'' in ''{1}'' -- {2}
 jshell.err.feedback.multiple.sections = Selector kind in multiple sections of selector list ''{0}'' in ''{1}'' -- {2}
@@ -117,22 +120,25 @@
 
 jshell.msg.feedback.new.mode = Created new feedback mode: {0}
 jshell.msg.feedback.mode = Feedback mode: {0}
-jshell.msg.feedback.mode.following = The feedback mode should be one of the following:
+jshell.msg.feedback.mode.following = Available feedback modes:
+jshell.msg.feedback.retained.mode.following = Retained feedback modes:
+jshell.err.mode.creation = To create a new mode either the -command or the -quiet option must be used -- {0}
+jshell.err.mode.exists = Mode to be created already exists: {0} -- {1}
 
 jshell.err.truncation.expected.length = Expected truncation length -- {0}
 jshell.err.truncation.length.not.integer = Truncation length must be an integer: {0} -- {1}
 
 jshell.err.not.valid.with.predefined.mode = Not valid with a predefined mode: {0} -- {1}
 jshell.err.retained.feedback.mode.must.be.retained.or.predefined = \
-''/retain feedback <mode>'' requires that <mode> is predefined or has been retained with ''/retain mode'' -- {0}
+''/set feedback -retain <mode>'' requires that <mode> is predefined or has been retained with ''/set mode -retain'' -- {0}
 
 jshell.err.unknown.option = Unknown option: {0} -- {1}
 jshell.err.default.option.or.program = Specify -default option or program, not both -- {0}
-jshell.err.option.or.filename = Specify either one option or a startup file name -- {0}
+jshell.err.option.or.filename = Specify no more than one of -default, -none, or a startup file name -- {0}
 jshell.err.unexpected.at.end = Unexpected arguments at end of command: {0} -- {1}
 jshell.err.conflicting.options = Conflicting options -- {0}
 jshell.err.cannot.delete.current.mode = The current feedback mode ''{0}'' cannot be deleted, use ''/set feedback'' first -- {1}
-jshell.err.cannot.delete.retained.mode = The retained feedback mode ''{0}'' cannot be deleted, use ''/retain feedback'' first -- {1}
+jshell.err.cannot.delete.retained.mode = The retained feedback mode ''{0}'' cannot be deleted, use ''/set feedback -retain'' first -- {1}
 jshell.err.may.not.specify.options.and.snippets = Options and snippets must not both be used: {0}
 jshell.err.no.such.snippets = No such snippet: {0}
 jshell.err.the.snippet.cannot.be.used.with.this.command = This command does not accept the snippet ''{0}'' : {1}
@@ -374,36 +380,20 @@
      The contents of the specified <file> become the default start-up snippets and commands.\n\n\
 /set feedback <mode>\n\t\
      Set the feedback mode describing displayed feedback for entered snippets and commands.\n\n\
-/set mode <mode> [<old-mode>] [-command|-quiet|-delete]\n\t\
+/set mode <mode> [<old-mode>] -command|-quiet|-delete\n\t\
      Create or update a user-defined feedback mode, optionally copying from an existing mode.\n\n\
 /set prompt <mode> "<prompt>" "<continuation-prompt>"\n\t\
      Set the displayed prompts for a given feedback mode.\n\n\
 /set truncation <mode> <length> <selector>...\n\t\
-     Set the maximum length of a displayed value\n\
+     Set the maximum length of a displayed value.\n\n\
 /set format <mode> <field> "<format>" <selector>...\n\t\
-     Configure a feedback mode by setting the format of a field when the selector matchs.\n\n\
+     Configure a feedback mode by setting the format of a field when the selector matches.\n\n\
+/set\n\t\
+     Show editor, start, and feedback settings as /set commands.\n\t\
+     To show the settings of any of the above, omit the set value.\n\n\
 To get more information about one of these forms, use /help with the form specified.\n\
 For example:   /help /set format
 
-help.retain.summary = retain jshell configuration information for subsequent sessions
-help.retain.args = editor|start|feedback|mode
-help.retain =\
-Retain jshell configuration information for future invocations of the jshell tool,\n\
-including: the external editor to use, the start-up definitions to use, the\n\
-configuration of a feedback mode, or the feedback mode to use.\n\
-\n\
-/retain editor [<command> <optional-arg>...]\n\t\
-     Specify the command to launch for the /edit command.\n\t\
-     The <command> is an operating system dependent string.\n\n\
-/retain start [<file>]\n\t\
-     The contents of the specified <file> become the default start-up snippets and commands.\n\n\
-/retain feedback [<mode>]\n\t\
-     Set the feedback mode describing displayed feedback for entered snippets and commands.\n\n\
-/retain mode <mode>\n\t\
-     Create a user-defined feedback mode, optionally copying from an existing mode.\n\n\
-To get more information about one of these forms, use /help with the form specified.\n\
-For example:   /help /retain feedback
-
 help.quest.summary = get information about jshell
 help.quest.args = [<command>|<subject>]
 help.quest =\
@@ -467,11 +457,24 @@
         possible fully qualified names based on the content of the specified classpath.\n\t\t\
         The "<fix-shortcut>" is either Alt-F1 or Alt-Enter, depending on the platform.
 
+help.set._retain = \
+The '-retain' option saves a setting so that it is used in future sessions.\n\
+The -retain option can be used on the following forms of /set:\n\n\t\
+/set editor -retain\n\t\
+/set start -retain\n\t\
+/set feedback -retain\n\t\
+/set mode -retain\n\n\
+See these commands for more detail -- for example /help /set editor
+
 help.set.format = \
-Set the format for reporting a snippet event.\n\
+Set the format for reporting a snippet event:\n\
 \n\t\
 /set format <mode> <field> "<format>" <selector>...\n\
 \n\
+Show the format settings:\n\
+\n\t\
+/set format [<mode> [<field>]]\n\
+\n\
 Where <mode> is the name of a previously defined feedback mode -- see '/help /set mode'.\n\
 Where <field> is the name of context-specific format to define.\n\
 Where <format> is a quoted string which will be the value of the field if one of\n\
@@ -541,13 +544,24 @@
 /set format myformat action 'Update replaced' replaced-update\n\t\
 /set format myformat display '{pre}{action} class {name}{post}' class-ok\n\t\
 /set format myformat display '{pre}{action} variable {name}, reset to null{post}' replaced-vardecl,varinit-ok-update\n\n\
-Note that subsequent selectors for a field may overwrite some or all of previous used selectors -- last one wins\n
+Note that subsequent selectors for a field may overwrite some or all of previous used selectors -- last one wins\n\
+\n\
+The form without <format> shows the current format settings.\n\
+When the <mode> is specified only the format settings for that mode are shown.\n\
+When both the <mode> and <field> are specified only the format settings for that\n\
+mode and field are shown.  Example:\n\t\
+/set format myformat\n\
+shows the format settings for the mode myformat\n
 
 help.set.truncation = \
-Set the max length a displayed value.\n\
+Set the max length of a displayed value:\n\
 \n\t\
 /set truncation <mode> <length> <selector>...\n\
 \n\
+Show the current truncation settings:\n\
+\n\t\
+/set truncation [<mode>]\n\
+\n\
 Where <mode> is the name of a previously defined feedback mode -- see '/help /set mode'.\n\
 Where <length> is an unsigned integer representing a maximum length.\n\
 Where <selector> is only needed if you wish to fine-tune value truncation length\n\
@@ -571,46 +585,108 @@
 /set trunc mymode 80\n\t\
 /set truncation mymode 45 expression\n\t\
 /set truncation mymode 0 vardecl-modified,replaced\n\n\
-Note that subsequent selectors for a field may overwrite some or all of previous used selectors -- last one wins\n
+Note that subsequent selectors for a field may overwrite some or all of previous used selectors -- last one wins\n\
+\n\
+The form without <length> shows the truncation settings.\n\
+When the <mode> is specified only the truncation settings for that mode are shown.\n\
+Example:\n\t\
+/set truncation myformat\n\
+shows the truncation settings for the mode myformat\n
 
 help.set.feedback = \
-Set the feedback mode describing displayed feedback for entered snippets and commands.\n\
+Set the feedback mode describing displayed feedback for entered snippets and commands:\n\
+\n\t\
+/set feedback [-retain] <mode>\n\
+\n\
+Retain the current feedback mode for future sessions:\n\
 \n\t\
-/set feedback <mode>\n\
+/set feedback -retain\n\
+\n\
+Show the feedback mode and list available modes:\n\
+\n\t\
+/set feedback\n\
 \n\
 Where <mode> is the name of a previously defined feedback mode.\n\
 You may use just enough letters to make it unique.\n\
 User-defined modes can be added, see '/help /set mode'\n\
-Currently defined feedback modes:\n
+\n\
+When the -retain option is used, the setting will be used in this and future\n\
+runs of the jshell tool.\n\
+\n\
+The form without <mode> or -retain displays the current feedback mode and available modes.\n
 
 help.set.mode = \
-Create a user-defined feedback mode, optionally copying from an existing mode.\n\
+Create a user-defined feedback mode, optionally copying from an existing mode:\n\
 \n\t\
 /set mode <mode> [<old-mode>] [-command|-quiet|-delete]\n\
+Retain a user-defined feedback mode for future sessions:\n\
+\n\t\
+/set mode -retain <mode>\n\
+\n\
+Delete a user-defined feedback mode:\n\
+\n\t\
+/set mode -delete [-retain] <mode>\n\
+\n\
+Show feedback mode settings:\n\
+\n\t\
+/set mode [<mode>]\n\
 \n\
 Where <new-mode> is the name of a mode you wish to create.\n\
 Where <old-mode> is the name of a previously defined feedback mode.\n\
 If <old-mode> is present, its settings are copied to the new mode.\n\
 '-command' vs '-quiet' determines if informative/verifying command feedback is displayed.\n\
 \n\
-Once the new mode is created, use '/set format' and '/set prompt' to configure it.\n\
-Use '/set feedback' to use the new mode.\n\
+Once the new mode is created, use '/set format', '/set prompt' and '/set truncation'\n\
+to configure it.  Use '/set feedback' to use the new mode.\n\
+\n\
+When the -retain option is used, the mode (including its component prompt, format,\n\
+and truncation settings) will be used in this and future runs of the jshell tool.\n\
+When both -retain and -delete are used, the mode is deleted from the current\n\
+and future sessions.\n\
+\n\
+The form without options shows the mode settings.\n\
+When the <mode> is specified only the mode settings for that mode are shown.\n\
+Note: the settings for the mode include the settings for prompt, format, and\n\
+truncation -- so these are displayed as well.\n\
+Example:\n\t\
+/set mode myformat\n\
+shows the mode, prompt, format, and truncation settings for the mode myformat\n
 
 help.set.prompt = \
-Set the prompts.  Both the normal prompt and the continuation-prompt must be set.\n\
+Set the prompts.  Both the normal prompt and the continuation-prompt must be set:\n\
 \n\t\
 /set prompt <mode> \"<prompt>\" \"<continuation-prompt>\"\n\
 \n\
+Show the normal prompt and the continuation-prompts:\n\
+\n\t\
+/set prompt [<mode>]\n\
+\n\
 Where <mode> is the name of a previously defined feedback mode.\n\
 Where <prompt> and <continuation-prompt> are quoted strings printed as input prompts;\n\
 Both may optionally contain '%s' which will be substituted with the next snippet id --\n\
 note that what is entered may not be assigned that id, for example it may be an error or command.\n\
-The continuation-prompt is used on the second and subsequent lines of a multi-line snippet.\n
+The continuation-prompt is used on the second and subsequent lines of a multi-line snippet.\n\
+\n\
+The form without <prompt> shows the currently set prompts.\n\
+When the <mode> is specified only the prompts for that mode are shown.\n\
+Example:\n\t\
+/set prompt myformat\n\
+shows the prompts set for the mode myformat\n
 
 help.set.editor =\
-Specify the command to launch for the /edit command.\n\
+Specify the command to launch for the /edit command:\n\
+\n\t\
+/set editor [-retain] [-wait] <command>\n\
 \n\t\
-/set editor [-wait] <command>|-default\n\
+/set editor [-retain] [-retain] -default\n\
+\n\
+Retain the current editor setting for future sessions:\n\
+\n\t\
+/set editor -retain\n\
+\n\
+Show the command to launch for the /edit command:\n\
+\n\t\
+/set editor\n\
 \n\
 The <command> is an operating system dependent string.\n\
 The <command> may include space-separated arguments (such as flags)\n\n\
@@ -622,12 +698,29 @@
 flags should be used to prevent immediate exit, or the -wait option should be used to\n\
 prompt the user to indicate when edit mode should end.\n\n\
 Note: while in edit mode no command inputs are seen.  After leaving edit mode changes\n\
-to the edited snippets are not seen.
+to the edited snippets are not seen.\n\
+\n\
+When the -retain option is used, the setting will be used in this and future\n\
+runs of the jshell tool.\n\
+\n\
+The form without <command> or options shows the editor setting.\n
 
 help.set.start =\
-Set the start-up configuration -- a sequence of snippets and commands read at start-up.\n\
+Set the start-up configuration -- a sequence of snippets and commands read at start-up:\n\
+\n\t\
+/set start [-retain] <file>\n\
+\n\t\
+/set start [-retain] -default\n\
 \n\t\
-/set start <file>|-default|-none\n\
+/set start [-retain] -none\n\
+\n\
+Retain the start-up configuration for future sessions:\n\
+\n\t\
+/set start -retain\n\
+\n\
+Show the start-up setting:\n\
+\n\t\
+/set start\n\
 \n\
 The contents of the specified <file> become the start-up snippets and commands used\n\
 when the /reset or /reload commands are used in this session.\n\
@@ -637,59 +730,14 @@
 or commands will be used.\n\
 This command is good for testing the start-up settings.  To retain them for future\n\
 runs of the jshell tool use the command:\n\t\
-/retain start\n
-
-help.retain.feedback = \
-Retain which feedback mode to use for displayed feedback for entered snippets and commands.\n\
-This feedback mode will be used in this and future sessions of the jshell tool.\n\
-\n\t\
-/retain feedback [<mode>]\n\
-\n\
-Where <mode> is the name of a previously defined feedback mode.\n\
-You may use just enough letters to make it unique.\n\
-If the <mode> is not specified, this command retains the current mode (as set\n\
-with the most recent /set feedback or /retain feedback command.)\n\
-
-help.retain.mode = \
-Retain the existence and configuration of a user-defined feedback mode.\n\
-This mode will be available in this and future sessions of the jshell tool.
-\n\t\
-/retain mode <mode>\n\
+/set start -retain\n\
 \n\
-Where <mode> is the name of a mode you wish to retain.\n\
-The <mode> must previously have been created with /set mode and\n\
-configured as desired with /set prompt, /set format, and /set truncation.\n
-
-help.retain.editor =\
-Retain the command to launch for the /edit command.  This command will be invoked when\n\
-the /edit command is used in this and future sessions of the jshell tool.\n\
-\n\t\
-/retain editor [<command>|-default]\n\
+When the -retain option is used, the setting will be used in this and future\n\
+runs of the jshell tool.\n\
 \n\
-If <command> is specified, it is an operating system dependent string which\n\
-may include space-separated arguments (such as flags). When /edit is used, the\n\
-temporary file to edit will be appended as the last argument.\n\
-If instead the -default option is specified, the built-in default editor will be used.\n\
-If neither is specified, the editor set in the last /set editor or /retain editor\n\
-command will be used.\n\
-The editor will be retained and used in this and future runs of the jshell tool.
-
-help.retain.start =\
-Retain the start-up configuration -- a sequence of snippets and commands read\n\
-at start-up.\n\
-\n\t\
-/retain start [<file>|-default|-none]\n\
-\n\
-If <file> is specified, the contents of the specified <file> become the\n\
-start-up snippets\n\
-and commands.\n\
-If instead the -default option is specified, the predefined start-up snippets\n\
-will be the start-up.\n\
-If the -none option is used, the start-up will be empty -- no start-up snippets\n\
-or commands will be used.\n\
-If none of these is specified, the start-up is the last specified in a\n\
-''/set start'' or ''/retain start'' command.\n\
-The start-up will be retained and used when the jshell tool is started or reset
+The form without <file> or options shows the start-up setting.\n\
+Note: if the start-up was last set from a file, this is shown with the\n\
+contents of the file followed by a 'set start' command.
 
 startup.feedback = \
 /set mode verbose -command    \n\
@@ -773,6 +821,8 @@
 \n\
 /set mode silent -quiet    \n\
 /set prompt silent '-> ' '>> '    \n\
+/set truncation silent 80\n\
+/set truncation silent 1000                                                                  varvalue,expression\n\
 /set format silent pre '|  '    \n\
 /set format silent post '%n'    \n\
 /set format silent errorpre '|  '    \n\