1 package net.sourceforge.phpdt.internal.launching;
3 import org.eclipse.core.runtime.CoreException;
4 import org.eclipse.core.runtime.IProgressMonitor;
5 import org.eclipse.core.runtime.IStatus;
6 import org.eclipse.core.runtime.Status;
7 import org.eclipse.debug.core.ILaunch;
8 import org.eclipse.debug.core.ILaunchConfiguration;
9 import org.eclipse.debug.core.model.ILaunchConfigurationDelegate;
12 public class PHPLaunchConfigurationDelegate implements ILaunchConfigurationDelegate {
13 protected static final InterpreterRunner interpreterRunner = new InterpreterRunner();
14 // protected static final DebuggerRunner debuggerRunner = new DebuggerRunner();
16 public PHPLaunchConfigurationDelegate() {
21 * @see ILaunchConfigurationDelegate#launch(ILaunchConfiguration, String, ILaunch, IProgressMonitor)
23 public void launch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException {
24 if (PHPRuntime.getDefault().getSelectedInterpreter() == null)
25 throw new CoreException(new Status(IStatus.ERROR, PHPLaunchingPlugin.PLUGIN_ID, IStatus.OK, "You must define an interpreter before running PHP.", null));
26 // if (mode.equals("debug")) {
27 // debuggerRunner.run(new InterpreterRunnerConfiguration(configuration), launch);
29 interpreterRunner.run(new InterpreterRunnerConfiguration(configuration), launch);