Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-patch] ErrorParserManager check the if the file exists.

2002-10-31 Alain Magloire

        * src/.../ErrorParserManager.java (findFilePath):
        Check if the file exists to not to return a phantom resource.
 

Index: org/eclipse/cdt/core/ErrorParserManager.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/src/org/eclipse/cdt/core/ErrorParserManager.java,v
retrieving revision 1.1
diff -u -r1.1 ErrorParserManager.java
--- org/eclipse/cdt/core/ErrorParserManager.java        23 Oct 2002 18:20:11 -0000      1.1
+++ org/eclipse/cdt/core/ErrorParserManager.java        31 Oct 2002 14:52:26 -0000
@@ -272,7 +272,8 @@
                else {
                        path = (IPath) getWorkingDirectory().append(filePath);
                }
-               return (IFile) fProject.getFile(path);
+               IFile file = fProject.getFile(path);
+               return (file.exists()) ? file : null;
        }
 
        protected class Problem {




Back to the top