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:
parent
424182887a
commit
e0d1a45365
3 changed files with 9 additions and 2 deletions
|
@ -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
|
2004-12-22 Alain Magloire
|
||||||
|
|
||||||
On going work to clean cdt.ui from misc. warnings
|
On going work to clean cdt.ui from misc. warnings
|
||||||
|
|
|
@ -166,7 +166,9 @@ public abstract class CElement extends PlatformObject implements ICElement {
|
||||||
IResource r = getUnderlyingResource();
|
IResource r = getUnderlyingResource();
|
||||||
if (r != null) {
|
if (r != null) {
|
||||||
ResourceAttributes attributes = r.getResourceAttributes();
|
ResourceAttributes attributes = r.getResourceAttributes();
|
||||||
return attributes.isReadOnly();
|
if (attributes != null) {
|
||||||
|
return attributes.isReadOnly();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -308,7 +308,7 @@ public abstract class Openable extends Parent implements IOpenable, IBufferChang
|
||||||
IResource res = getResource();
|
IResource res = getResource();
|
||||||
if (res != null) {
|
if (res != null) {
|
||||||
ResourceAttributes attributes = res.getResourceAttributes();
|
ResourceAttributes attributes = res.getResourceAttributes();
|
||||||
if (attributes.isReadOnly()) {
|
if (attributes != null && attributes.isReadOnly()) {
|
||||||
throw new CModelException(new CModelStatus(ICModelStatusConstants.READ_ONLY, this));
|
throw new CModelException(new CModelStatus(ICModelStatusConstants.READ_ONLY, this));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue