*
*/
private String MapPath (PHPLineBreakpoint phpLBP) {
- IPath filename;
+ IPath filename;
+ IPath remotePath;
+ IPath newpath;
+ IPath localPath;
+ String local;
if (remote) {
filename = phpLBP.getMarker().getResource().getProjectRelativePath();
}
}
- if (pathtranslation && remote) {
- if (remoteSourcePath.toString ().substring (0, 1).equals ("/")) {
- path = path.replace ('\\', '/');
- }
- else {
- path = path.replace ('/', '\\');
+ if (remoteSourcePath.isEmpty ()) {
+ if ((pathmap != null) && remote) {
+ java.util.Iterator iterator = pathmap.keySet().iterator();
+
+ while (iterator.hasNext ()) {
+ local = (String) iterator.next (); // Get the local/client side path of the mapping
+ remotePath = new Path ((String) pathmap.get (local)); // Get the remote/server side path of the mapping
+ localPath = new Path (local); // Get the remote/server side path of the mapping
+
+ if (localPath.isPrefixOf (filename)) { // Starts the remote/server side file path with the remote/server side mapping path
+ // dann prefix abhängen und den remote path davorhägen
+ newpath = filename.removeFirstSegments (localPath.matchingFirstSegments (filename));
+ newpath = remotePath.append (newpath);
+ path = newpath.toString ();
+
+ if (path.substring (0, 1).equals ("/")) {
+ path = path.replace ('\\', '/');
+ }
+ else {
+ path = path.replace ('/', '\\');
+ }
+
+ return path;
+ }
+ }
}
- }
+ }
+ else {
+ if (pathtranslation && remote) {
+ if (remoteSourcePath.toString ().substring (0, 1).equals ("/")) {
+ path = path.replace ('\\', '/');
+ }
+ else {
+ path = path.replace ('/', '\\');
+ }
+ }
+ }
return path;
}
phpLBP = (PHPLineBreakpoint) breakpoint;
// bpNo= DBGInt.addBreakpoint(phpLBP.getMarker().getResource().getLocation().toOSString(), phpLBP.getLineNumber());
-
- bpNo = DBGInt.addBreakpoint(MapPath(phpLBP), phpLBP.getLineNumber());
+ if (phpLBP.isConditionEnabled ()) {
+ bpNo = DBGInt.addBreakpoint (MapPath(phpLBP),
+ phpLBP.getLineNumber(),
+ phpLBP.getHitCount(),
+ phpLBP.getCondition ());
+ }
+ else {
+ bpNo = DBGInt.addBreakpoint (MapPath(phpLBP),
+ phpLBP.getLineNumber(),
+ phpLBP.getHitCount(),
+ "");
+ }
+
phpLBP.setDBGBpNo(bpNo);
}
} catch (IOException e) {