| Summary: | IResource.accept(IResourceVisitior,...) should not check existence | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Dani Megert <daniel_megert> | ||||||||||||||
| Component: | Resources | Assignee: | Szymon Ptaszkiewicz <sptaszkiewicz> | ||||||||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||||||||
| Severity: | normal | ||||||||||||||||
| Priority: | P3 | CC: | markus.kell.r, Szymon.Brandys | ||||||||||||||
| Version: | 3.6 | Keywords: | api | ||||||||||||||
| Target Milestone: | 3.8 M2 | ||||||||||||||||
| Hardware: | All | ||||||||||||||||
| OS: | All | ||||||||||||||||
| Whiteboard: | |||||||||||||||||
| Attachments: |
|
||||||||||||||||
|
Description
Dani Megert
Point 1) I would make IResource.accept(IResourceVisitor,...) and IResource.accept(IResourceProxyVisitor,...) consistent and would check the existence only for the resource on which accept is called. Since the change may affect callers, I would postpone this change to 3.8. Point 2) IResource.DO_NOT_CHECK_EXISTENCE should be moved to 3.8. (In reply to comment #1) +1. Created attachment 200435 [details]
Patch v1
Comments:
- increment the plug-in version, we have an API change here
- I would change the doc in IResource#accept(s)
from
@param memberFlags bit-wise or of member flag constants
* ({@link IContainer#INCLUDE_PHANTOMS}, {@link IContainer#INCLUDE_TEAM_PRIVATE_MEMBERS},
* {@link IContainer#INCLUDE_HIDDEN} and {@link IResource#DO_NOT_CHECK_EXISTENCE})
* indicating which members are of interest and if the resource on which the method
* is called should be checked for the existence
to
@param memberFlags bit-wise or of member flag constants
* ({@link IContainer#INCLUDE_PHANTOMS}, {@link IContainer#INCLUDE_TEAM_PRIVATE_MEMBERS},
* {@link IContainer#INCLUDE_HIDDEN} indicating which members are of interest and {@link IResource#DO_NOT_CHECK_EXISTENCE})
* if the resource on which the method is called should NOT be checked for the existence
- I think Point 1) from comment 1 is not addressed
- update the migration guide about the change
(In reply to comment #4) > - I think Point 1) from comment 1 is not addressed Ignore this point. Created attachment 201563 [details]
Patch v2
In Patch v2 there is also one small fix for a typo in 3.7 migration guide. Created attachment 201565 [details]
Patch v3
Changed recommended.html according to Szymon's suggestions.
Created attachment 201589 [details]
Patch v4
Simplified test + changes in documentation.
Created attachment 201631 [details]
Patch v5
The new flag moved to IContainer.
Looks good. Once tests pass, release please. Patch v5 released. * Member constant (bit mask value 16) indicating that a resource * should not be checked for the existence. The "the" sounds wrong here. You would say that you "check for the existence *of* a certain property". But your usage is similar to "check a device for errors", where a "the" would also be wrong. Please correct this in all the new Javadocs. Created attachment 201904 [details]
Patch with updated Javadocs
Patch with updated Javadocs released. core.resources part released to Git, doc.isv part released to CVS. Thanks Markus! |