Package org.mozilla.javascript.tools

Examples of org.mozilla.javascript.tools.ToolErrorReporter


        }
    }

    public Main()
    {
        reporter = new ToolErrorReporter(true);
        compilerEnv = new CompilerEnvirons();
        compilerEnv.setErrorReporter(reporter);
        compiler = new ClassCompiler(compilerEnv);
    }
View Full Code Here


    /**
     *  Execute the given arguments, but don't System.exit at the end.
     */
    public static int exec(String origArgs[])
    {
        errorReporter = new ToolErrorReporter(false, global.getErr());
        shellContextFactory.setErrorReporter(errorReporter);
        String[] args = processOptions(origArgs);
        if (processStdin)
            fileList.addElement(null);

View Full Code Here

        }
    }

    public Main()
    {
        reporter = new ToolErrorReporter(true);
        compilerEnv = new CompilerEnvirons();
        compilerEnv.setErrorReporter(reporter);
        compiler = new ClassCompiler(compilerEnv);
    }
View Full Code Here

        int status = self.exec(args);
        System.exit(status);
    }

    private int exec(String[] args) {
        R = new ToolErrorReporter(true, System.err);

        int arg_count = process_options(args);

        if (arg_count == 0) {
            option_error(ToolErrorReporter.getMessage(
View Full Code Here

        ByteArrayOutputStream err = new ByteArrayOutputStream();
        this.setOut(new PrintStream(out));
        this.setErr(new PrintStream(err));
        String resultString = "";
        ErrorReporter savedErrorReporter = cx.getErrorReporter();
        cx.setErrorReporter(new ToolErrorReporter(false, this.getErr()));
        try {
            testCount++;
          Object result = cx.evaluateString(scope, inputString,
                          "doctest input", 1, null);
              if (result != Context.getUndefinedValue() &&
View Full Code Here

    /**
     *  Execute the given arguments, but don't System.exit at the end.
     */
    public static int exec(String origArgs[])
    {
        errorReporter = new ToolErrorReporter(false, global.getErr());
        shellContextFactory.setErrorReporter(errorReporter);
        String[] args = processOptions(origArgs);
        if (mainModule != null && !fileList.contains(mainModule))
            fileList.add(mainModule);
        if (processStdin)
View Full Code Here

        shell.defineFunctionProperties(
                new String[] {"print", "defineClass"},
                Global.class,
                ScriptableObject.DONTENUM);
       
        cx.setErrorReporter(new ToolErrorReporter(false, System.err));
        return shell;
    }
View Full Code Here

     */
    public static int exec(String args[]) {
        Context cx = enterContext();
        // Create the top-level scope object.
        global = getGlobal();
        errorReporter = new ToolErrorReporter(false, global.getErr());
        cx.setErrorReporter(errorReporter);

        args = processOptions(cx, args);

        if (processStdin)
View Full Code Here

        int status = self.exec(args);
        System.exit(status);
    }

    private int exec(String[] args) {
        R = new ToolErrorReporter(true, System.err);

        int arg_count = process_options(args);

        if (arg_count == 0) {
            option_error(R.getMessage
View Full Code Here

     * compile scripts.
     */
    public static void main(String args[]) {
        Context cx = Context.enter();

        reporter = new ToolErrorReporter(true);

        cx.setErrorReporter(reporter);

        args = processOptions(cx, args);

View Full Code Here

TOP

Related Classes of org.mozilla.javascript.tools.ToolErrorReporter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.