aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacek Pospychala2013-01-07 08:13:40 (EST)
committerJacek Pospychala2013-01-07 08:13:40 (EST)
commitd84058c923b85f1676134dba6f96613350f79a84 (patch)
treedf8da344c551bb4ed408a25faa10a71c556bf145
parent3c71221683d7e9032a634801b5a89fc9cd79b115 (diff)
downloadorg.eclipse.pdt-d84058c923b85f1676134dba6f96613350f79a84.zip
org.eclipse.pdt-d84058c923b85f1676134dba6f96613350f79a84.tar.gz
org.eclipse.pdt-d84058c923b85f1676134dba6f96613350f79a84.tar.bz2
Bug 397128 - Do not try to find mapped file in all projects if project
is known
-rw-r--r--plugins/org.eclipse.php.debug.core/src/org/eclipse/php/internal/debug/core/pathmapper/DebugSearchEngine.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/plugins/org.eclipse.php.debug.core/src/org/eclipse/php/internal/debug/core/pathmapper/DebugSearchEngine.java b/plugins/org.eclipse.php.debug.core/src/org/eclipse/php/internal/debug/core/pathmapper/DebugSearchEngine.java
index 492b824..26fb6f4 100644
--- a/plugins/org.eclipse.php.debug.core/src/org/eclipse/php/internal/debug/core/pathmapper/DebugSearchEngine.java
+++ b/plugins/org.eclipse.php.debug.core/src/org/eclipse/php/internal/debug/core/pathmapper/DebugSearchEngine.java
@@ -39,6 +39,7 @@ import org.eclipse.php.internal.core.util.PHPSearchEngine.Result;
import org.eclipse.php.internal.debug.core.IPHPDebugConstants;
import org.eclipse.php.internal.debug.core.PHPDebugPlugin;
import org.eclipse.php.internal.debug.core.pathmapper.PathEntry.Type;
+import org.eclipse.php.internal.debug.core.zend.model.PHPDebugTarget;
import org.eclipse.ui.*;
import org.eclipse.ui.ide.FileStoreEditorInput;
@@ -97,6 +98,9 @@ public class DebugSearchEngine {
project = resource.getProject();
}
}
+ if (project == null && debugTarget instanceof PHPDebugTarget) {
+ project = ((PHPDebugTarget) debugTarget).getProject();
+ }
if (project == null) {
String projectName;
try {
@@ -208,8 +212,13 @@ public class DebugSearchEngine {
// Search in the whole workspace:
Set<IncludePath> s = new LinkedHashSet<IncludePath>();
Set<IBuildpathEntry> b = new LinkedHashSet<IBuildpathEntry>();
- IProject[] projects = ResourcesPlugin.getWorkspace().getRoot()
- .getProjects();
+ IProject[] projects = null;
+ if (currentProject != null && currentProject.isOpen()) {
+ projects = new IProject[] { currentProject };
+ } else {
+ projects = ResourcesPlugin.getWorkspace().getRoot()
+ .getProjects();
+ }
for (IProject project : projects) {
if (project.isOpen() && project.isAccessible()) {
// get include paths of all projects