diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/TranslationUnit.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/TranslationUnit.java index 39b41a113a7..98d92175332 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/TranslationUnit.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/TranslationUnit.java @@ -573,6 +573,17 @@ public class TranslationUnit extends Openable implements ITranslationUnit { String lid = type.getLanguage().getId(); return lid != null && lid.equals(ICFileTypeConstants.LANG_ASM); } + + + /* (non-Javadoc) + * @see org.eclipse.cdt.core.model.ICElement#exists() + */ + public boolean exists() { + IResource res = getResource(); + if (res != null) + return res.exists(); + return super.exists(); + } }