diff --git a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CElementInfo.java b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CElementInfo.java index 333c15e2ac0..c37308c8ec1 100644 --- a/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CElementInfo.java +++ b/core/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/CElementInfo.java @@ -94,6 +94,20 @@ class CElementInfo { return fIsStructureKnown; } + /** + * @see ICElement.isStructureKnown() + */ + public boolean isReadOnly () { + try { + IResource r = getElement().getUnderlyingResource(); + if (r != null) { + return r.isReadOnly(); + } + } catch (CModelException e) { + } + return true; + } + /** * Returns an array with all the same elements as the specified array except for * the element to remove. Assumes that the deletion is contained in the array.