public abstract class ResourceVariantTree extends AbstractResourceVariantTree
AbstractResourceVariantTree
using a
ResourceVariantByteStore
.IResourceVariantTree
,
AbstractResourceVariantTree
,
ResourceVariantByteStore
Modifier | Constructor and Description |
---|---|
protected |
ResourceVariantTree(ResourceVariantByteStore store)
Create a resource variant tree that uses the provided byte store to
cache the resource variant bytes.
|
Modifier and Type | Method and Description |
---|---|
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.
|
collectedMembers, fetchMembers, fetchVariant, refresh, refresh
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getResourceVariant, roots
protected ResourceVariantTree(ResourceVariantByteStore store)
store
- the resource variant byte store used to cache resource variantspublic IResource[] members(IResource resource) throws TeamException
IResourceVariantTree
getResourceVariant(IResource)
.resource
- the local resourceTeamException
public boolean hasResourceVariant(IResource resource) throws TeamException
IResourceVariantTree
resource
- the local resourcetrue
if the tree contains a variant for the resourceTeamException
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 varianttrue
if the resource variant changedTeamException
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 handleTeamException
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 monitorTeamException
Copyright (c) 2000, 2016 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.