Package com.dubture.symfony.core.model

Examples of com.dubture.symfony.core.model.AppKernel


        }

        config = wc.doSave();
        String URL = null;
        Logger.debugMSG("getting dev kernel from " + scriptProject.getElementName());
        AppKernel kernel = SymfonyKernelAccess.getDefault().getDevelopmentKernel(scriptProject);

        if (kernel == null) {
            Logger.debugMSG("No kernel found");
            return null;
        }
        Logger.debugMSG("kernel found: " + kernel.getScript());
        if (selectedURL != null) {
            Logger.debugMSG("found exisiting url: " + selectedURL);
            URL = selectedURL;
        } else {
            try {

                URL = ServerUtils.constructURL(config, scriptProject, route, kernel);
                Logger.debugMSG("Generated launch configuration url: " + URL);
                if (URL == null)
                    URL = "";
            } catch (Exception e) {
                // safe as resolved URL is server.getBaseURL()
                e.printStackTrace();
                if (URL == null)
                    URL = "";
            }
        }

        wc.setAttribute(Server.BASE_URL, URL);
        wc.setAttribute(SymfonyServer.URL, URL);

        // Display a dialog for selecting the route parameters.
        if (route.hasParameters()) {

            String title = "Please insert the required route parameters";
            SymfonyURLLaunchDialog launchDialog = new SymfonyURLLaunchDialog(wc, title, route);
            launchDialog.setBlockOnOpen(true);
            if (launchDialog.open() != PHPWebPageURLLaunchDialog.OK) {
                deleteLaunchconfig(config);
                return null;
            }
        }


        wc.setAttribute(SymfonyServer.ROUTE, route.getName());
        wc.setAttribute(SymfonyServer.ENVIRONMENT, kernel.getEnvironment());
        config = wc.doSave();
        return config;
    }
View Full Code Here

TOP

Related Classes of com.dubture.symfony.core.model.AppKernel

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.