*/
public static String getBaseUrl(ILaunchConfiguration configuration, IScriptProject project, AppKernel kernel)
throws CoreException {
ILaunchConfigurationWorkingCopy wc = configuration.getWorkingCopy();
Server server = ServersManager.getServer(configuration.getAttribute(
Server.NAME, ""));
if (kernel == null)
return null;
String env = kernel.getEnvironment();
wc.setAttribute(SymfonyServer.ENVIRONMENT, env);
wc.doSave();
boolean isVhost = isVirtualHost(server, kernel);
String base = "";
if (isVhost) {
base = String.format("%s/%s", server.getBaseURL(), kernel.getScript());
} else {
base = String.format("%s/%s/%s", server.getBaseURL(), project.getElementName(), kernel.getPath());
}
return base;
}