diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelManager.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelManager.java index 943662ea232..4e168735106 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelManager.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CModelManager.java @@ -198,9 +198,18 @@ public class CModelManager implements IResourceChangeListener, ICDescriptorListe } if (res != null && !res.exists()) { res = null; + } + } + + // In case this is an external resource see if we can find + // a file for it. + if (res == null) { + IFile[] files = root.findFilesForLocation(path); + if (files.length > 0) { + res = files[0]; } } - // TODO: for extenal resources ?? + return create(res, null); } @@ -1129,4 +1138,4 @@ public class CModelManager implements IResourceChangeListener, ICDescriptorListe removeBinaryRunner(project); } -} +} \ No newline at end of file