X-Git-Url: http://git.phpeclipse.com diff --git a/net.sourceforge.phpeclipse.launching/src/net/sourceforge/phpdt/internal/launching/InterpreterRunnerConfiguration.java b/net.sourceforge.phpeclipse.launching/src/net/sourceforge/phpdt/internal/launching/InterpreterRunnerConfiguration.java index 8cec3f2..b2950d7 100644 --- a/net.sourceforge.phpeclipse.launching/src/net/sourceforge/phpdt/internal/launching/InterpreterRunnerConfiguration.java +++ b/net.sourceforge.phpeclipse.launching/src/net/sourceforge/phpdt/internal/launching/InterpreterRunnerConfiguration.java @@ -1,20 +1,29 @@ package net.sourceforge.phpdt.internal.launching; import java.io.File; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; -import net.sourceforge.phpeclipse.resourcesview.PHPProject; +import net.sourceforge.phpdt.internal.core.JavaProject; import org.eclipse.core.resources.IProject; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.Path; import org.eclipse.debug.core.ILaunchConfiguration; +import org.eclipse.debug.internal.ui.launchConfigurations.EnvironmentVariable; + public class InterpreterRunnerConfiguration { protected ILaunchConfiguration configuration; + private HashMap fEnvironment; public InterpreterRunnerConfiguration(ILaunchConfiguration aConfiguration) { configuration = aConfiguration; + fEnvironment= new HashMap(); } public String getAbsoluteFileName() { @@ -32,9 +41,9 @@ public class InterpreterRunnerConfiguration { } catch(CoreException e) {} return fileName.replace('\\', '/'); - } + } - public PHPProject getProject() { + public JavaProject getProject() { String projectName = ""; try { @@ -45,7 +54,7 @@ public class InterpreterRunnerConfiguration { IProject project = PHPLaunchingPlugin.getWorkspace().getRoot().getProject(projectName); - PHPProject phpProject = new PHPProject(); + JavaProject phpProject = new JavaProject(); phpProject.setProject(project); return phpProject; } @@ -94,6 +103,56 @@ public class InterpreterRunnerConfiguration { return false; } + public boolean useDBGSessionInBrowser() { + try { + return configuration.getAttribute(PHPLaunchConfigurationAttribute.OPEN_DBGSESSION_IN_BROWSER, true); + } catch(CoreException e) { + PHPLaunchingPlugin.log(e); + } + return false; + } + + public void setEnvironment(String[] envp) + { + if (envp== null) + return; + for (int i = 0; i