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