Community
Participate
Working Groups
IResource#isReadOnly API was marked deprecated during 3.1 in favor of a more general API IResource#getResourceAttributes(), see bug 26100. It should be removed according to the deprecation policy. The specific API to be removed includes: org.eclipse.core.resources.IResource#setReadOnly org.eclipse.core.resources.IResource#isReadOnly
I'm not convinced about deleting this one. I found 30+ references to it in the Eclipse SDK alone, so clearly it is heavily used and will cause migration pain for clients. One concern is that the equivalent of: boolean result = resource.isReadOnly() Using the new API is: boolean result = false; ResourceAttributes attrs = resource.getResourceAttributes(); if (attrs != null) result = attrs.isReadOnly(); Since the equivalent code with the new API is much longer, clients still use the old method as a convenience. So, unless we can argue that the old method produces a result that is misleading or wrong in some cases, I think we should keep it.
So maybe we should remove the @deprecated flag. Instead we should say that this is a convenience method as we already do in some other cases.
*** This bug has been marked as a duplicate of bug 208982 ***