Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkelsey2008-07-18 07:52:24 -0400
committerdkelsey2008-07-18 07:52:24 -0400
commitc5bbd337d49f97bd36932695eab48d847fc01899 (patch)
tree5de4f8b1ad0ab6a938f79ab11c7b3cde8318d2f9
parent8dfc2b42e175a5a64fc6c9c423d86d5edfa50ee1 (diff)
downloadorg.eclipse.pdt-R1_0_3_20080406.tar.gz
org.eclipse.pdt-R1_0_3_20080406.tar.xz
org.eclipse.pdt-R1_0_3_20080406.zip
bugzilla: 238912 path mapping when using filesystem paths were not working for files defined in the workspaceRoot_R1_0_5_20080723R1_0_3_20080406
-rw-r--r--plugins/org.eclipse.php.debug.core/src/org/eclipse/php/internal/debug/core/xdebug/dbgp/model/DBGpTarget.java34
1 files changed, 18 insertions, 16 deletions
diff --git a/plugins/org.eclipse.php.debug.core/src/org/eclipse/php/internal/debug/core/xdebug/dbgp/model/DBGpTarget.java b/plugins/org.eclipse.php.debug.core/src/org/eclipse/php/internal/debug/core/xdebug/dbgp/model/DBGpTarget.java
index 9dfa52678..4765b4b41 100644
--- a/plugins/org.eclipse.php.debug.core/src/org/eclipse/php/internal/debug/core/xdebug/dbgp/model/DBGpTarget.java
+++ b/plugins/org.eclipse.php.debug.core/src/org/eclipse/php/internal/debug/core/xdebug/dbgp/model/DBGpTarget.java
@@ -1303,13 +1303,12 @@ public class DBGpTarget extends DBGpElement implements IDBGpDebugTarget, IStep,
/**
* map the file on this file system to the external one expected by xdebug
* 1. file is in the workspace
- * a) use PDT Path mapper
- * b) if no mapping use Internal Path mapper
- * c) send as is
+ * a) use PDT Path mapper workspace definition
+ * b) if no mapping found use external file name and PDT path mapper file system definition
+ * c) if no mapping found then send external file name
* 2. file is outside of the workspace
- * a) use PDT Path mapper
- * b) send as is (cannot use Internal Path mapper here)
- *
+ * a) use PDT Path mapper and PDT path mapper file system definition
+ * b) if no mapping found then send as is (cannot use Internal Path mapper here)
*
* @param bp
* the breakpoint which references the file to be mapped to an
@@ -1318,18 +1317,21 @@ public class DBGpTarget extends DBGpElement implements IDBGpDebugTarget, IStep,
*/
private String mapToExternalFileIfRequired(DBGpBreakpoint bp) {
String internalFile = "";
-
- if (bp.getIFile() == null) {
- // file is not part of the workspace, so get fully qualified file
- internalFile = bp.getFileName();
- } else {
- // get file relative to the workspace.
- internalFile = bp.getIFile().getFullPath().toString();
- }
-
String mappedFileName = null;
+
if (pathMapper != null) {
- mappedFileName = pathMapper.getRemoteFile(internalFile);
+ if (bp.getIFile() != null) {
+ // file is defined in the workspace so attempt to map it using the workspace definition
+ internalFile = bp.getIFile().getFullPath().toString();
+ mappedFileName = pathMapper.getRemoteFile(internalFile);
+ }
+
+ if (mappedFileName == null) {
+ // file is not defined in the workspace or no mapping for workspace file exists
+ // so try to map the fully qualified file.
+ internalFile = bp.getFileName();
+ mappedFileName = pathMapper.getRemoteFile(internalFile);
+ }
}
if (mappedFileName == null) {

Back to the top