Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Schorn2009-01-14 06:09:54 -0500
committerMarkus Schorn2009-01-14 06:09:54 -0500
commit8d815b790d1ae30bf02f2cfd32bee2223bb643ae (patch)
tree45d812f2fc27ecaa9478d8723e68f44f6a14b890 /core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/commenthandler
parent4ae53aa136da1e7b6696bc56f57b27197c929439 (diff)
downloadorg.eclipse.cdt-8d815b790d1ae30bf02f2cfd32bee2223bb643ae.tar.gz
org.eclipse.cdt-8d815b790d1ae30bf02f2cfd32bee2223bb643ae.tar.xz
org.eclipse.cdt-8d815b790d1ae30bf02f2cfd32bee2223bb643ae.zip
Use Platform's findFiles as fallback, bug 260516.
Diffstat (limited to 'core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/commenthandler')
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/commenthandler/NodeCommenter.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/commenthandler/NodeCommenter.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/commenthandler/NodeCommenter.java
index 4fdf8068f7..6128784898 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/commenthandler/NodeCommenter.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/commenthandler/NodeCommenter.java
@@ -35,8 +35,8 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTTemplateDeclaration;
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTWhileStatement;
import org.eclipse.cdt.internal.core.dom.parser.cpp.GPPASTExplicitTemplateInstantiation;
import org.eclipse.cdt.internal.core.dom.rewrite.util.OffsetHelper;
+import org.eclipse.cdt.internal.core.resources.ResourceLookup;
import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
@@ -150,8 +150,7 @@ public class NodeCommenter {
return true;
}
IPath path = new Path(node.getContainingFilename());
- IFile[] files = ResourcesPlugin.getWorkspace().getRoot().findFilesForLocation(path);
- IFile file = files.length > 0 ? files[0] : null; // NPE thrown below, like original behavior
+ IFile file = ResourceLookup.selectFileForLocation(path, null); // NPE thrown below, like original behavior
//XXX HSR Guido: Possible Performance Issue (File access)
try {

Back to the top