|
Eclipse Platform Release 3.1 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.team.core.variants.AbstractResourceVariantTree
org.eclipse.team.core.variants.ResourceVariantTree
Provides caching for a AbstractResourceVariantTree
using a
ResourceVariantByteStore
.
IResourceVariantTree
,
AbstractResourceVariantTree
,
ResourceVariantByteStore
Constructor Summary | |
---|---|
protected |
ResourceVariantTree(ResourceVariantByteStore store)
Create a resource variant tree that uses the provided byte store to cache the resource variant bytes. |
Method Summary | |
---|---|
protected IResource[] |
collectChanges(IResource local,
IResourceVariant remote,
int depth,
IProgressMonitor monitor)
Collect the changes in the remote tree to the specified depth. |
void |
flushVariants(IResource resource,
int depth)
Flush any variants in the tree for the given resource to the depth specified. |
protected byte[] |
getBytes(IResource local,
IResourceVariant remote)
Get the bytes to be stored in the ResourceVariantByteStore
from the given resource variant. |
protected ResourceVariantByteStore |
getByteStore()
Get the byte store that is used to cache the serialization bytes for the resource variants of this tree. |
boolean |
hasResourceVariant(IResource resource)
Return whether the local resource has a variant in this tree. |
IResource[] |
members(IResource resource)
Returns the members of the local resource that have resource variants in this tree. |
protected boolean |
setVariant(IResource local,
IResourceVariant remote)
Set the variant associated with the local resource to the newly fetched resource variant. |
Methods inherited from class org.eclipse.team.core.variants.AbstractResourceVariantTree |
---|
collectedMembers, fetchMembers, fetchVariant, refresh, refresh |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.eclipse.team.core.variants.IResourceVariantTree |
---|
getResourceVariant, roots |
Constructor Detail |
protected ResourceVariantTree(ResourceVariantByteStore store)
store
- the resource variant byte store used to cache resource variantsMethod Detail |
public IResource[] members(IResource resource) throws TeamException
IResourceVariantTree
getResourceVariant(IResource)
.
resource
- the local resource
TeamException
public boolean hasResourceVariant(IResource resource) throws TeamException
IResourceVariantTree
resource
- the local resource
true
if the tree contains a variant for the resource
TeamException
public void flushVariants(IResource resource, int depth) throws TeamException
IResourceVariantTree
resource
- the resourcedepth
- the flush depth (one of IResource.DEPTH_ZERO
,
IResource.DEPTH_ONE
, or IResource.DEPTH_INFINITE
)
TeamException
protected boolean setVariant(IResource local, IResourceVariant remote) throws TeamException
AbstractResourceVariantTree
setVariant
in class AbstractResourceVariantTree
local
- the local resourceremote
- the newly fetched resource variant
true
if the resource variant changed
TeamException
protected ResourceVariantByteStore getByteStore()
This method is not intended to be overridden by subclasses.
protected byte[] getBytes(IResource local, IResourceVariant remote) throws TeamException
ResourceVariantByteStore
from the given resource variant. By default, the IResourceVariant#asBytes()
method is used to get the bytes.
local
- the local resourceremote
- the corresponding resource variant handle
TeamException
protected IResource[] collectChanges(IResource local, IResourceVariant remote, int depth, IProgressMonitor monitor) throws TeamException
AbstractResourceVariantTree
collectChanges
in class AbstractResourceVariantTree
local
- the local resource being refreshedremote
- the corresponding resource variantdepth
- the depth of the refresh (one of IResource.DEPTH_ZERO
,
IResource.DEPTH_ONE
, or IResource.DEPTH_INFINITE
)monitor
- a progress monitor
TeamException
|
Eclipse Platform Release 3.1 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2005. All rights reserved.