Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmanuel Graf2008-10-29 07:50:20 -0400
committerEmanuel Graf2008-10-29 07:50:20 -0400
commit4beb0402dc0350622890b3643f6558bcc509ee78 (patch)
treec1db1633bc587b5485c8c1d004129dc295816739 /core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/rewrite/commenthandler
parent9ca7ade7ee969db29932c171da09ee162eb300fc (diff)
downloadorg.eclipse.cdt-4beb0402dc0350622890b3643f6558bcc509ee78.tar.gz
org.eclipse.cdt-4beb0402dc0350622890b3643f6558bcc509ee78.tar.xz
org.eclipse.cdt-4beb0402dc0350622890b3643f6558bcc509ee78.zip
FIXED - bug 252511: UnhandedASTModificationException when refactoring source files in linked directories
https://bugs.eclipse.org/bugs/show_bug.cgi?id=252511 Patch by Tom Ball
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.java3
1 files changed, 2 insertions, 1 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 3cae3e20ea..4fdf8068f7 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
@@ -150,7 +150,8 @@ public class NodeCommenter {
return true;
}
IPath path = new Path(node.getContainingFilename());
- IFile file = ResourcesPlugin.getWorkspace().getRoot().getFileForLocation(path);
+ IFile[] files = ResourcesPlugin.getWorkspace().getRoot().findFilesForLocation(path);
+ IFile file = files.length > 0 ? files[0] : null; // NPE thrown below, like original behavior
//XXX HSR Guido: Possible Performance Issue (File access)
try {

Back to the top