Subversion Repositories pub

Compare Revisions

Ignore whitespace Rev 67 → Rev 68

/pluggablejs/trunk/src/net/outlyer/plugins/Shell.java
62,11 → 62,12
try {
// undocumented features: when
// $net_outlyer.runtime.internal.shell,autoEOL is true an extra println() is
// $net_outlyer.runtime.internal.shell.autoEOL is true an extra println() is
// issued after each eval
// and when
// $net_outlyer.runtime.internal.shell.inspect is true the result
// of each line is automatically printed
// arrayDump is used internally to print JavaScript arrays
rhino.eval(getInternalObjectFieldName("shell")+" = { " +
" autoEOL: false, inspect: true, arrayDump: null };");
jsArray = rhino.eval("new Array()");
74,8 → 75,8
// Define the arrayDump internal function
rhino.eval(arrayDumpFn+
" = function(arr) {\n" +
" var s = new String();" +
" s += '[';\n" +
" if (0==arr.length) { java.lang.System.out.println('[]'); return; }\n"+
" var s = new String('[');" +
" for (var i=0;i<arr.length;++i) {\n" +
" s += arr[i]+',';\n" +
" }\n" +
155,7 → 156,7
pe.exportObject("ui", new GUI());
pe.exportObject("gui", new GUI());
pe.exportObject("cui", new UI()); // cui stands for Console UI
pe.exportObject("lang", new LanguageExtensions());
pe.exportObject("lang", new RedundantLanguageExtensions());
final PluginObject po = new PluginObject();
pe.setPluginObject(po);