Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.team.core.mapping.provider
Class ResourceDiff


java.lang.Object
  extended by 

org.eclipse.team.core.diff.provider.Diff
      extended by 

org.eclipse.team.core.diff.provider.TwoWayDiff
          extended by 
org.eclipse.team.core.mapping.provider.ResourceDiff
All Implemented Interfaces:
IDiff, ITwoWayDiff, IResourceDiff

public class ResourceDiff
extends TwoWayDiff
implements IResourceDiff

Implementation of IResourceDiff.

This class may be subclassed by clients.

Since:
3.2

Field Summary
 
Fields inherited from class org.eclipse.team.core.diff.provider. TwoWayDiff
FLAG_MASK
 
Fields inherited from class org.eclipse.team.core.diff.provider. Diff
KIND_MASK
 
Fields inherited from interface org.eclipse.team.core.mapping. IResourceDiff
DESCRIPTION, OPEN
 
Fields inherited from interface org.eclipse.team.core.diff. ITwoWayDiff
CONTENT, COPY_FROM, MOVE_FROM, MOVE_TO, REPLACE
 
Fields inherited from interface org.eclipse.team.core.diff. IDiff
ADD, CHANGE, NO_CHANGE, REMOVE
 
Constructor Summary
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
 
Method Summary
 boolean equals ( Object obj)
           
  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.
 
Methods inherited from class org.eclipse.team.core.diff.provider. TwoWayDiff
getFlags, getFromPath, getToPath
 
Methods inherited from class org.eclipse.team.core.diff.provider. Diff
getKind, getPath, getStatus, hashCode, toDiffString
 
Methods inherited from class java.lang. Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.team.core.diff. ITwoWayDiff
getFlags, getFromPath, getToPath
 
Methods inherited from interface org.eclipse.team.core.diff. IDiff
getKind, getPath, toDiffString
 

Constructor Detail

ResourceDiff

public ResourceDiff(
IResource resource,
                    int kind,
                    int flags,
                    
IFileRevision before,
                    
IFileRevision after)
Create a two-way resource diff

Parameters:
resource - the resource
kind - the kind of change (ADDED, REMOVED or CHANGED)
flags - additional flags that describe the change
before - the before state of the model object
after - the after state of the model object

ResourceDiff

public ResourceDiff(
IResource resource,
                    int kind)
Convenience constructor for creating a simple folder diff that consists of a resource and a kind only. It is equivalent to ResourceDiff(resource, kind, 0, null, null)

Parameters:
resource - a resource
kind - the kind of change (ADDED, REMOVED or CHANGED)
Method Detail

getBeforeState

public 
IFileRevision getBeforeState()
Description copied from interface: IResourceDiff
Return a handle to the file state representing the "before" state of the file used to calculate this diff. A null 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.

Specified by:
getBeforeState in interface IResourceDiff
Returns:
a handle to the file state representing the "before" state used to calculate this diff

getAfterState

public 
IFileRevision getAfterState()
Description copied from interface: IResourceDiff
Return a handle to the file state representing the "after" state of the file used to calculate this diff. A null 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.

Specified by:
getAfterState in interface IResourceDiff
Returns:
a handle to the file state representing the "before" state used to calculate this diff

getResource

public 
IResource getResource()
Description copied from interface: IResourceDiff
Return the local resource to which this diff applies.

Specified by:
getResource in interface IResourceDiff
Returns:
the local resource to which this diff applies

equals

public boolean equals(
Object obj)
Overrides:
equals in class TwoWayDiff

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire