nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/tools/Shell.java
changeset 32152 705d4af0d4d7
parent 31549 b627094c5649
child 32245 80164edf8a10
equal deleted inserted replaced
32063:c25e882cee96 32152:705d4af0d4d7
    66      */
    66      */
    67     private static final String MESSAGE_RESOURCE = "jdk.nashorn.tools.resources.Shell";
    67     private static final String MESSAGE_RESOURCE = "jdk.nashorn.tools.resources.Shell";
    68     /**
    68     /**
    69      * Shell message bundle.
    69      * Shell message bundle.
    70      */
    70      */
    71     private static final ResourceBundle bundle = ResourceBundle.getBundle(MESSAGE_RESOURCE, Locale.getDefault());
    71     protected static final ResourceBundle bundle = ResourceBundle.getBundle(MESSAGE_RESOURCE, Locale.getDefault());
    72 
    72 
    73     /**
    73     /**
    74      * Exit code for command line tool - successful
    74      * Exit code for command line tool - successful
    75      */
    75      */
    76     public static final int SUCCESS = 0;
    76     public static final int SUCCESS = 0;
   401      *
   401      *
   402      * @param context the nashorn context
   402      * @param context the nashorn context
   403      * @param global  global scope object to use
   403      * @param global  global scope object to use
   404      * @return return code
   404      * @return return code
   405      */
   405      */
   406     private static int readEvalPrint(final Context context, final Global global) {
   406     protected int readEvalPrint(final Context context, final Global global) {
   407         final String prompt = bundle.getString("shell.prompt");
   407         final String prompt = bundle.getString("shell.prompt");
   408         final BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
   408         final BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
   409         final PrintWriter err = context.getErr();
   409         final PrintWriter err = context.getErr();
   410         final Global oldGlobal = Context.getGlobal();
   410         final Global oldGlobal = Context.getGlobal();
   411         final boolean globalChanged = (oldGlobal != global);
   411         final boolean globalChanged = (oldGlobal != global);