JavaScript Development Tools
Release 3.2

org.eclipse.wst.jsdt.debug.rhino.debugger.shell
Class DebugMain

java.lang.Object
  extended by org.eclipse.wst.jsdt.debug.rhino.debugger.shell.DebugMain

public class DebugMain
extends java.lang.Object

A proxy to running Main that allows us to run a batch of scripts without using the -e load(...) arguments. As well any argument not paired to a known kind (see below) will be considered as an absolute path to a script (*.js) file.

This runner supports the following:


The following examples assume you have properly set up your classpath to reference org.mozilla.javascript.jar, org.eclipse.wst.jsdt.debug.rhino.debugger.jar and org.eclipse.wst.jsdt.debug.transport. Also the fully qualified name use to run DebugMain is org.eclipse.wst.jsdt.debug.rhino.debugger.shell.DebugMain Examples

%>java DebugMain -opt 7 -strict -f /home/user/scripts/a.js /home/user/scripts/b.js -version 170 %> java DebugMain -version 140 -e load('/home/user/scripts/a.js','/home/user/scripts/b.js')

Since:
1.1

Field Summary
static java.lang.String ARG_DEBUG
          Constant representing the debug argument

Value is: -debug
static java.lang.String ARG_E
          Constant representing the evaluate argument

Value is: -e
static java.lang.String ARG_ENCODING
          Constant representing the encoding argument

Value is: -encoding
static java.lang.String ARG_F
          Constant representing the script file(s) argument

Value is: -f
static java.lang.String ARG_FATAL_WARNINGS
          Constant representing the fatal-warnings argument

Value is: -fatal-warnings
static java.lang.String ARG_HELP
          Constant representing the help argument

Value is: -help
static java.lang.String ARG_O
          Constant representing the optimization argument

Value is: -O
static java.lang.String ARG_OPT
          Constant representing the optimization argument

Value is: -opt
static java.lang.String ARG_QM
          Constant representing the help argument

Value is: -?
static java.lang.String ARG_SEALEDLIB
          Constant representing the sealed lib argument

Value is: -sealedlib
static java.lang.String ARG_STRICT
          Constant representing the strict argument

Value is: -strict
static java.lang.String ARG_W
          Constant representing the report warnings argument

Value is: -w
static java.lang.String FROM_EVAL
          Copy from Main to specify as the path when evaluating a script via the -e argument

Value is: <command>
static java.lang.String GLOBAL_ARGUMENTS
          Constant representing the name of the array containing the original script arguments in the global context

Value is: arguments
static java.lang.String MSG_SHELL_INVALID
          Constant representing the invalid message identifier for Main

Value is: msg.shell.invalid
static java.lang.String MSG_SHELL_USAGE
          Constant representing the invalid usage message identifier for Main

Value is: msg.shell.usage
 
Constructor Summary
DebugMain()
           
 
Method Summary
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ARG_DEBUG

public static final java.lang.String ARG_DEBUG
Constant representing the debug argument

Value is: -debug

See Also:
Constant Field Values

ARG_E

public static final java.lang.String ARG_E
Constant representing the evaluate argument

Value is: -e

See Also:
Constant Field Values

ARG_ENCODING

public static final java.lang.String ARG_ENCODING
Constant representing the encoding argument

Value is: -encoding

See Also:
Constant Field Values

ARG_F

public static final java.lang.String ARG_F
Constant representing the script file(s) argument

Value is: -f

See Also:
Constant Field Values

ARG_FATAL_WARNINGS

public static final java.lang.String ARG_FATAL_WARNINGS
Constant representing the fatal-warnings argument

Value is: -fatal-warnings

See Also:
Constant Field Values

ARG_HELP

public static final java.lang.String ARG_HELP
Constant representing the help argument

Value is: -help

See Also:
Constant Field Values

ARG_O

public static final java.lang.String ARG_O
Constant representing the optimization argument

Value is: -O

See Also:
Constant Field Values

ARG_OPT

public static final java.lang.String ARG_OPT
Constant representing the optimization argument

Value is: -opt

See Also:
Constant Field Values

ARG_QM

public static final java.lang.String ARG_QM
Constant representing the help argument

Value is: -?

See Also:
Constant Field Values

ARG_SEALEDLIB

public static final java.lang.String ARG_SEALEDLIB
Constant representing the sealed lib argument

Value is: -sealedlib

See Also:
Constant Field Values

ARG_STRICT

public static final java.lang.String ARG_STRICT
Constant representing the strict argument

Value is: -strict

See Also:
Constant Field Values

ARG_W

public static final java.lang.String ARG_W
Constant representing the report warnings argument

Value is: -w

See Also:
Constant Field Values

MSG_SHELL_INVALID

public static final java.lang.String MSG_SHELL_INVALID
Constant representing the invalid message identifier for Main

Value is: msg.shell.invalid

See Also:
Constant Field Values

MSG_SHELL_USAGE

public static final java.lang.String MSG_SHELL_USAGE
Constant representing the invalid usage message identifier for Main

Value is: msg.shell.usage

See Also:
Constant Field Values

FROM_EVAL

public static final java.lang.String FROM_EVAL
Copy from Main to specify as the path when evaluating a script via the -e argument

Value is: <command>

See Also:
Constant Field Values

GLOBAL_ARGUMENTS

public static final java.lang.String GLOBAL_ARGUMENTS
Constant representing the name of the array containing the original script arguments in the global context

Value is: arguments

See Also:
Constant Field Values
Constructor Detail

DebugMain

public DebugMain()
Method Detail

main

public static void main(java.lang.String[] args)
Parameters:
args -

JavaScript Development Tools
Release 3.2

Copyright (c) IBM Corp. and others 2000, 2010. All Rights Reserved.