public class ResourceDiff extends TwoWayDiff implements IResourceDiff
IResourceDiff.
This class may be subclassed by clients.
FLAG_MASKDESCRIPTION, OPEN| Constructor and Description |
|---|
ResourceDiff(IResource resource,
int kind)
Convenience constructor for creating a simple folder diff
that consists of a resource and a kind only.
|
ResourceDiff(IResource resource,
int kind,
int flags,
IFileRevision before,
IFileRevision after)
Create a two-way resource diff
|
| Modifier and Type | Method and Description |
|---|---|
IFileRevision |
getAfterState()
Return a handle to the file state representing the "after" state
of the file used to calculate this diff.
|
IFileRevision |
getBeforeState()
Return a handle to the file state representing the "before" state
of the file used to calculate this diff.
|
IResource |
getResource()
Return the local resource to which this diff applies.
|
getFlags, getFromPath, getToPathgetKind, getPath, getStatus, toDiffStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetFlags, getFromPath, getToPathgetKind, getPath, toDiffStringpublic ResourceDiff(IResource resource, int kind, int flags, IFileRevision before, IFileRevision after)
resource - the resourcekind - the kind of change (ADDED, REMOVED or CHANGED)flags - additional flags that describe the changebefore - the before state of the model objectafter - the after state of the model objectpublic ResourceDiff(IResource resource, int kind)
ResourceDiff(resource, kind, 0, null, null)resource - a resourcekind - the kind of change (ADDED, REMOVED or CHANGED)public IFileRevision getBeforeState()
IResourceDiffnull is
returned if the resource is not a file or if the file does not exist in
the before state. If a file state is returned, clients should still
check the IFileState.exists() method to see if the file
existed in the before state.getBeforeState in interface IResourceDiffpublic IFileRevision getAfterState()
IResourceDiffnull is
returned if the resource is not a file or if the file does not exist in
the after state. If a file state is returned, clients should still
check the IFileState.exists() method to see if the file
existed in the after state.getAfterState in interface IResourceDiffpublic IResource getResource()
IResourceDiffgetResource in interface IResourceDiffGuidelines for using Eclipse APIs. Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.