* Script that is on the top of the debug stack currently
* @return local file, or <code>null</code> in case of resolving failure
*/
public String convertToLocalFilename(String remoteFile, String cwd,
String currentScript) {
PHPDebugTarget debugTarget = debugHandler.getDebugTarget();
if (debugTarget.getContextManager().isResolveBlacklisted(remoteFile)) {
return remoteFile;
}
IWorkspace workspace = ResourcesPlugin.getWorkspace();
// check if this file is already local
if (workspace.getRoot().findMember(remoteFile) != null) {
return remoteFile;
}
// If we are running local debugger, check if "remote" file exists and
// return it if it does
if (debugTarget.isPHPCGI() && new File(remoteFile).exists()) {
IFile wsFile = null;
IPath location = new Path(remoteFile);
IProject[] projects = workspace.getRoot().getProjects();
IProject currentProject = debugTarget.getProject();
// set current project to higher priority:
for (int i = 0; i < projects.length; i++) {
IProject project = projects[i];
if (project.equals(currentProject)) {
IProject tmp = projects[0];