Examples of Main


Examples of net.sourceforge.htmlunit.corejs.javascript.tools.debugger.Main

     * @see <a href="http://www.mozilla.org/rhino/debugger.html">Mozilla Rhino Debugger Documentation</a>
     */
    public static void attachVisualDebugger(final WebClient client) {
        final ScopeProvider sp = null;
        final HtmlUnitContextFactory cf = client.getJavaScriptEngine().getContextFactory();
        final Main main = Main.mainEmbedded(cf, sp, "HtmlUnit JavaScript Debugger");

        final SourceProvider sourceProvider = new SourceProvider() {
            public String getSource(final DebuggableScript script) {
                String sourceName = script.getSourceName();
                if (sourceName.startsWith("script in ")) {
                    sourceName = StringUtils.substringBetween(sourceName, "script in ", " from");
                    for (final WebWindow ww : client.getWebWindows()) {
                        final WebResponse wr = ww.getEnclosedPage().getWebResponse();
                        if (sourceName.equals(wr.getRequestSettings().getUrl().toString())) {
                            return wr.getContentAsString();
                        }
                    }
                }
                return null;
            }
        };
        main.setSourceProvider(sourceProvider);
    }
View Full Code Here

Examples of net.sourceforge.purrpackage.reporting.Main

                srcDir } );
    }

    @Test
    public void testParseArgs() throws Exception {
        Main m = new Main();
        m.parseArguments(new String[] { "--datafile", "a", "--destination",
                "b", "--encoding", "c", "f", "g" });
        assertEquals(m.support.getCoverageDataFile().getName(), "a");
        assertEquals(m.support.getDestinationDir().getName(), "b");
        assertEquals(m.support.getEncoding(), "c");
        assertEquals(m.support.getFinder().getSourceDirectoryList().size(), 2);
        m = new Main();
        try {
            m.parseArguments(new String[] {});
            fail();
        } catch (Exception e) {
            assertTrue(e.getMessage().indexOf("destination") > -1);
        }
        assertNotNull(m.support.getCoverageDataFile());
View Full Code Here

Examples of org.apache.batik.apps.rasterizer.Main

                File source = (File) pair.first;
                File target = (File) pair.second;
                args[index + 1] = target.getAbsolutePath();
                args[index + 2] = source.getAbsolutePath();
               
                Main rasterizer = new Main(args);
                rasterizer.execute();
            }
           
        }
    }
View Full Code Here

Examples of org.apache.camel.guice.Main

     *
     * @param args
     * @throws Exception
     */
    public static void main(String[] args) throws Exception {
        new Main().run(args);
    }
View Full Code Here

Examples of org.apache.camel.main.Main

    /**
     * A main() so we can easily run these routing rules in our IDE
     */
    public static void main(String... args) throws Exception {
        Main main = new Main();
        main.enableHangupSupport();
        main.addRouteBuilder(new MyRouteBuilder());
        main.run(args);
    }
View Full Code Here

Examples of org.apache.camel.spring.Main

        url = "http://localhost:" + port + "/camel-example-cxf-proxy/webservices/incident";
    }

    protected void startCamel() throws Exception {
        if (!"true".equalsIgnoreCase(System.getProperty("skipStartingCamelContext"))) {
            main = new Main();
            main.setApplicationContextUri("META-INF/spring/camel-config.xml");
            main.start();
        } else {
            System.out.println("Skipping starting CamelContext as system property skipStartingCamelContext is set to be true.");
        }
View Full Code Here

Examples of org.apache.camel.spring.Main

    protected Object expectedBody = "<hello id='abc'>world!</hello>";

    public void testDebugger() throws Exception {
        // START SNIPPET: example
        // lets run the camel route in debug mode
        main = new Main();
        main.enableDebug();
        main.setApplicationContextUri("org/apache/camel/spring/debug/applicationContext.xml");
        main.start();

        // now lets test we have a debugger available
View Full Code Here

Examples of org.apache.camel.spring.Main

     * Allow this route to be run as an application
     *
     * @param args
     */
    public static void main(String[] args) throws Exception{
        new Main().run(args);
    }
View Full Code Here

Examples of org.apache.camel.spring.Main

     * Allow this route to be run as an application
     *
     * @param args
     */
    public static void main(String[] args) {
        new Main().run(args);
    }
View Full Code Here

Examples of org.apache.camel.spring.Main

     * Allow this route to be run as an application
     *
     * @param args
     */
    public static void main(String[] args) {
        new Main().run(args);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.