Package org.mozilla.javascript.tools.debugger

Examples of org.mozilla.javascript.tools.debugger.Main


        // the Rhino debugger
        sdb.openFile(filename);
    }

    public void go(final XScriptContext xsctxt, InputStream in) {
        Main sdb = initUI(xsctxt);

        // Open a stream in the debugger
        sdb.openStream(in);
    }
View Full Code Here


    // This code is based on the main method of the Rhino Debugger Main class
    // We pass in the XScriptContext in the global scope for script execution
    private Main initUI(final XScriptContext xsctxt) {
        try {
            final Main sdb = new Main("Rhino JavaScript Debugger");
            swingInvoke(new Runnable() {
                    public void run() {
                        sdb.pack();
                        sdb.setSize(640, 640);
                        sdb.setVisible(true);
                    }
                });
            sdb.setExitAction(new Runnable() {
                    public void run() {
                        sdb.dispose();
                    }
                });
            Context.addContextListener(sdb);
            sdb.setScopeProvider(new ScopeProvider() {
                    public Scriptable getScope() {
                        Context ctxt = Context.enter();
                        ImporterTopLevel scope = new ImporterTopLevel(ctxt);
                        Scriptable jsArgs = Context.toObject(xsctxt, scope);
                        scope.put("XSCRIPTCONTEXT", scope, jsArgs);
View Full Code Here

                if ( this.rhinoWindow != null )
                {
                    return;
                }
               
                final Main sdb = new Main("Rhino JavaScript Debugger");
                swingInvoke(new Runnable() {
                    public void run() {
                        sdb.pack();
                        sdb.setSize(640, 640);
                        sdb.setVisible(true);
                    }
                    });
                sdb.setExitAction(new Runnable() {
                    public void run() {
                        sdb.clearAllBreakpoints();
                        sdb.dispose();
                        shutdown();
                    }
                });
                Context.addContextListener(sdb);
                sdb.setScopeProvider(new ScopeProvider() {
                    public Scriptable getScope() {
                        return org.mozilla.javascript.tools.shell.Main.getScope();
                    }
                });
                sdb.addWindowListener( new WindowAdapter() {
                    public void windowClosing(WindowEvent e) {
                        shutdown();
                    }
                });
                this.rhinoWindow = sdb;
View Full Code Here

     */
    private static Main debugger;

    static synchronized Main getDebugger() {
        if (debugger == null) {
            final Main db = new Main("Cocoon Flow Debugger");
            db.pack();
            Dimension size = Toolkit.getDefaultToolkit().getScreenSize();
            size.width *= 0.75;
            size.height *= 0.75;
            db.setSize(size);
            db.setExitAction(new Runnable() {
                    public void run() {
                        db.setVisible(false);
                    }
                });
            db.setOptimizationLevel(OPTIMIZATION_LEVEL);
            db.setVisible(true);
            debugger = db;
            Context.addContextListener(debugger);
        }
        return debugger;
    }
View Full Code Here

     */
    private static Main debugger;

    static synchronized Main getDebugger() {
        if (debugger == null) {
            final Main db = new Main("Cocoon Flow Debugger");
            db.pack();
            Dimension size = Toolkit.getDefaultToolkit().getScreenSize();
            size.width *= 0.75;
            size.height *= 0.75;
            db.setSize(size);
            db.setExitAction(new Runnable() {
                    public void run() {
                        db.setVisible(false);
                    }
                });
            db.setOptimizationLevel(OPTIMIZATION_LEVEL);
            db.setVisible(true);
            debugger = db;
            Context.addContextListener(debugger);
        }
        return debugger;
    }
View Full Code Here

  public JasmineTestRunner(Class<?> testClass) {
    this.testClass = testClass;
    this.suiteAnnotation = getJasmineSuiteAnnotationFromTestClass();

    Main debugger = null;
    if (this.suiteAnnotation.debug()) {
      debugger = createDebugger();
    }

    this.rhinoContext = setUpRhinoScope();

    if (this.suiteAnnotation.debug()) {
      debugger.doBreak();
    }
  }
View Full Code Here

    context.evalJS("jasmine.getEnv().addReporter(new jasmine.DelegatorJUnitReporter());");
  }

  private Main createDebugger() {
    Main debugger = new Main("JS Debugger");

    debugger.setExitAction(new Runnable() {
      public void run() {
        System.exit(0);
      }
    });

    debugger.attachTo(ContextFactory.getGlobal());
    debugger.pack();
    debugger.setSize(600, 460);
    debugger.setVisible(true);

    return debugger;
  }
View Full Code Here

    public String getSVG (final String generalOptions, final T chartOptions) throws IOException {
      SVGHighchartsHelper.LOGGER.debug ("get svg for highcharts export functions with rhino");
      Object call;
      if (SVGHighchartsHelper.DEBUG) {
        SVGHighchartsHelper.LOGGER.debug ("launching rhino debugger");
        SVGHighchartsHelper.rhinoDebugger = new Main("rhino-debugger");

        SVGHighchartsHelper.rhinoDebugger.attachTo(getContextFactory ());
        SVGHighchartsHelper.rhinoDebugger.setScopeProvider(new ScopeProvider () {
          @Override
          public Scriptable getScope () {
View Full Code Here

TOP

Related Classes of org.mozilla.javascript.tools.debugger.Main

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.