import net.sourceforge.phpeclipse.builder.FileStorage;
import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.model.IPersistableSourceLocator;
import org.eclipse.debug.core.model.IStackFrame;
}
return fileName;
- } else {
+
+ } else {
+
+ IWorkspaceRoot root = PHPLaunchingPlugin.getWorkspace().getRoot();
+ Path filePath = new Path(fileName);
+
+ if (root.getFileForLocation(filePath) == null) {
+ IProject proj = root.getProject(projectName);
+ IFile[] files = root.findFilesForLocation(filePath);
+ for (int i = 0; i < files.length; i++) {
+ if (files[i].getProject().equals(proj)) {
+ fileName = proj.getLocation().append(files[i].getProjectRelativePath()).toOSString();
+ break;
+ }
+ }
+ }
+
return fileName;
}
}