Bug 313094 - Delete deprecated IResource#isReadOnly API
Summary: Delete deprecated IResource#isReadOnly API
Status: CLOSED DUPLICATE of bug 208982
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Resources (show other bugs)
Version: 3.6   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-Resources-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: api
Depends on:
Blocks:
 
Reported: 2010-05-17 05:35 EDT by Szymon Brandys CLA
Modified: 2015-03-12 14:18 EDT (History)
2 users (show)

See Also:
Szymon.Brandys: review? (john.arthorne)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Szymon Brandys CLA 2010-05-17 05:35:27 EDT
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
Comment 1 John Arthorne CLA 2010-05-17 09:13:55 EDT
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.
Comment 2 Szymon Brandys CLA 2010-05-17 11:57:56 EDT
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.
Comment 3 Markus Keller CLA 2015-03-12 14:18:51 EDT

*** This bug has been marked as a duplicate of bug 208982 ***