1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

2005-01-07 Alain Magloire

Fix PR 82202
	* model/org/eclipse/cdt/internal/core/model/CElement.java
	* model/org/eclipse/cdt/internal/core/model/Openable.java
This commit is contained in:
Alain Magloire 2005-01-07 17:50:11 +00:00
parent 424182887a
commit e0d1a45365
3 changed files with 9 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2005-01-07 Alain Magloire
Fix PR 82202
* model/org/eclipse/cdt/internal/core/model/CElement.java
* model/org/eclipse/cdt/internal/core/model/Openable.java
2004-12-22 Alain Magloire
On going work to clean cdt.ui from misc. warnings

View file

@ -166,7 +166,9 @@ public abstract class CElement extends PlatformObject implements ICElement {
IResource r = getUnderlyingResource();
if (r != null) {
ResourceAttributes attributes = r.getResourceAttributes();
return attributes.isReadOnly();
if (attributes != null) {
return attributes.isReadOnly();
}
}
return false;
}

View file

@ -308,7 +308,7 @@ public abstract class Openable extends Parent implements IOpenable, IBufferChang
IResource res = getResource();
if (res != null) {
ResourceAttributes attributes = res.getResourceAttributes();
if (attributes.isReadOnly()) {
if (attributes != null && attributes.isReadOnly()) {
throw new CModelException(new CModelStatus(ICModelStatusConstants.READ_ONLY, this));
}
}