|
Eclipse Platform 2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A callback for requesting information about a resource when using a fast resource visitor. All of the "get" methods on a resource proxy have trivial performance cost. Requesting the full path or the actual resource handle will cause extra objects to be created and will thus have greater cost.
Note that a resource proxy is a transient object that is only valid for the duration of a single visit method. A proxy should not be referenced once the single resource visit is complete. The equals and hashCode methods should not be relied on.
This interface is not intended to be implemented by clients.
IResourceProxyVisitor
Method Summary | |
long |
getModificationStamp()
Returns the modification stamp of the resource being visited. |
String |
getName()
Returns the simple name of the resource being visited. |
Object |
getSessionProperty(QualifiedName key)
Returns the value of the session property of the resource being visited, identified by the given key. |
int |
getType()
Returns the type of the resource being visited. |
boolean |
isAccessible()
Returns whether the resource being visited is accessible. |
boolean |
isDerived()
Returns whether the resource being visited is derived. |
boolean |
isLinked()
Returns whether the resource being visited is a linked resource. |
boolean |
isPhantom()
Returns whether the resource being visited is a phantom resource. |
boolean |
isTeamPrivateMember()
Returns whether the resource being visited is a team private member. |
IPath |
requestFullPath()
Returns the full workspace path of the resource being visited. |
IResource |
requestResource()
Returns the handle of the resource being visited. |
Method Detail |
public long getModificationStamp()
NULL_STAMP
if the
resource either does not exist or exists as a closed projectIResource.getModificationStamp()
public boolean isAccessible()
true
if the resource is accessible, and
false
otherwiseIResource.isAccessible()
public boolean isDerived()
true
if the resource is marked as derived, and
false
otherwiseIResource.isDerived()
public boolean isLinked()
true
if the resource is linked, and
false
otherwiseIResource.isLinked()
public boolean isPhantom()
true
if the resource is a phantom resource, and
false
otherwiseIResource.isPhantom()
public boolean isTeamPrivateMember()
true
if the resource is a team private member, and
false
otherwiseIResource.isTeamPrivateMember()
public String getName()
IResource.getName()
public Object getSessionProperty(QualifiedName key)
null
if this
resource has no such property.
Note that this method can return an out of date property value, or a value that no longer exists, if session properties are being modified concurrently with the resource visit.
key
- the qualified name of the propertynull
if the resource has no such propertyIResource.getSessionProperty(org.eclipse.core.runtime.QualifiedName)
public int getType()
IResource.getType()
public IPath requestFullPath()
Note that this is not a "free" proxy operation. This method will generally cause a path object to be created. For an optimal visitor, only call this method when absolutely necessary. Note that the simple resource name can be obtained from the proxy with no cost.
IResource.getFullPath()
public IResource requestResource()
Note that this is not a "free" proxy operation. This method will generally cause both a path object and a resource object to be created. For an optimal visitor, only call this method when absolutely necessary. Note that the simple resource name can be obtained from the proxy with no cost, and the full path of the resource can be obtained through the proxy with smaller cost.
|
Eclipse Platform 2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |