Accepts the given visitor for an optimized traversal. The visitor's
visit
method is called, and is provided with a proxy to this resource. The proxy is a transient object that can be queried very quickly for information about the resource. If the actual resource handle is needed, it can be obtained from the proxy. Requesting the resource handle, or the full path of the resource, will degrade performance of the visit.
The entire subtree under the given resource is traversed to infinite depth, unless the visitor ignores a subtree by returning false
from its visit
method.
No guarantees are made about the behavior of this method if resources are deleted or added during the traversal of this resource hierarchy. If resources are deleted during the traversal, they may still be passed to the visitor; if resources are created, they may not be passed to the visitor. If resources other than the one being visited are modified during the traversal, the resource proxy may contain stale information when that resource is visited.
If the INCLUDE_PHANTOMS
flag is not specified in the member flags (recommended), only member resources that exist will be visited. If the INCLUDE_PHANTOMS
flag is specified, the visit will also include any phantom member resource that the workspace is keeping track of.
If the INCLUDE_TEAM_PRIVATE_MEMBERS
flag is not specified (recommended), team private members will not be visited. If the INCLUDE_TEAM_PRIVATE_MEMBERS
flag is specified in the member flags, team private member resources are visited as well.
@param visitor the visitor
@param memberFlags bit-wise or of member flag constants(
IContainer.INCLUDE_PHANTOMS
and
INCLUDE_TEAM_PRIVATE_MEMBERS
) indicating which members are of interest
@exception CoreException if this request fails. Reasons include:
- the
INCLUDE_PHANTOMS
flag is not specified and this resource does not exist. - the
INCLUDE_PHANTOMS
flag is not specified and this resource is a project that is not open. - The visitor failed with this exception.
@see IContainer#INCLUDE_PHANTOMS
@see IContainer#INCLUDE_TEAM_PRIVATE_MEMBERS
@see IResource#isPhantom()
@see IResource#isTeamPrivateMember()
@see IResourceProxyVisitor#visit(IResourceProxy)
@since 2.1