Package org.mozilla.javascript.tools

Examples of org.mozilla.javascript.tools.ToolErrorReporter


import org.mozilla.javascript.tools.ToolErrorReporter;

public class JQueryScanner {

  public JQueryScanner(FileReader in) {
    final ErrorReporter reporter = new ToolErrorReporter(true);
    final CompilerEnvirons env = new CompilerEnvirons();
    final Parser parser = new Parser(env, reporter);

    try {
      parser.parse(in, null, 0);
View Full Code Here


    {
        // This should fail if ShrinkSafe is not in classpath
        try
        {
            global = Main.getGlobal();
            ToolErrorReporter errorReporter = new ToolErrorReporter(false, global.getErr());
            Main.shellContextFactory.setErrorReporter(errorReporter);

            // Do a trial compression to check
            compressJavaScript("");
        }
View Full Code Here

        }

        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

        }
    }

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

        }
    }

    public Main()
    {
        reporter = new ToolErrorReporter(true);
        compilerEnv = new CompilerEnvirons();
        compilerEnv.setErrorReporter(reporter);
        compiler = new ClassCompiler(compilerEnv);
    }
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 (processStdin)
            fileList.add(null);

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 (processStdin)
            fileList.add(null);

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

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.