1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-10 17:55:39 +02:00

fixed model.create(IPath)

This commit is contained in:
David Inglis 2002-11-12 13:51:55 +00:00
parent eb14748bb9
commit 86bd4ef30a
2 changed files with 9 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2002-11-12 David Inglis
* model/.../internal/core/model/CModelManager.java,v
fixed model.create(IPath) method so it returns a element which
actually exits
2002-11-08 Judy N. Green
* src/org/eclipse/cdt/internal/core/COwner.java
fixed check in constructor to throw error when ownerID is invalid

View file

@ -108,8 +108,10 @@ public class CModelManager implements IResourceChangeListener {
if (path.equals(rootPath))
return getCRoot(root);
res = root.getContainerForLocation(path);
if (res == null)
if (res == null || !res.exists())
res = root.getFileForLocation(path);
if (res != null && !res.exists())
res = null;
}
return create (res);
}