adding plug-in provider xdebug.core and xdebug.ui to fix ticket #640
[phpeclipse.git] / net.sourceforge.phpeclipse.launching / src / net / sourceforge / phpdt / internal / launching / InterpreterRunnerConfiguration.java
index 52fa78a..837d7f4 100644 (file)
@@ -10,6 +10,7 @@ import java.util.Map;
 import net.sourceforge.phpdt.internal.core.JavaProject;
 
 import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.Path;
@@ -30,7 +31,9 @@ public class InterpreterRunnerConfiguration {
                IPath path = new Path(getFileName());
                IProject project = getProject().getProject();
 
-               return project.getLocation().toOSString() + "/" + getFileName();
+               //return project.getLocation().toOSString() + "/" + getFileName();
+               IResource file = project.findMember(path);
+               return file.getFullPath().toOSString();
        }
 
        public String getFileName() {
@@ -191,7 +194,7 @@ public class InterpreterRunnerConfiguration {
 
                IProject project = getProject().getProject();
                if (!useRemoteDebugger())
-                       return project.getLocation().toOSString();
+                       return project.getFullPath().toOSString();
                else {
                        try {
                                return configuration.getAttribute(
@@ -204,4 +207,16 @@ public class InterpreterRunnerConfiguration {
                return "";
        }
 
+       public boolean useDBGSessionInExternalBrowser() {
+               try {
+                       return configuration
+                                       .getAttribute(
+                                                       PHPLaunchConfigurationAttribute.OPEN_DBGSESSION_IN_EXTERNAL_BROWSER,
+                                                       false);
+               } catch (CoreException e) {
+                       PHPLaunchingPlugin.log(e);
+               }
+               return false;
+       }
+
 }