Package org.eclipse.team.core.history
Interface IFileHistoryProvider
-
- All Known Implementing Classes:
FileHistoryProvider
public interface IFileHistoryProviderThis is API to access individual file histories.- Since:
- 3.2
- Restriction:
- This interface is not intended to be implemented by clients.
Clients can instead subclass
FileHistoryProvider.
-
-
Field Summary
Fields Modifier and Type Field Description static intNONEConstant flag used withgetFileHistoryFor(IResource, int, IProgressMonitor)to indicate no flags.static intSINGLE_LINE_OF_DESCENTConstant flag used withgetFileHistoryFor(IResource, int, IProgressMonitor)to indicate that the resulting history will be restricted to a single line-of-descent (e.g. a single branch).static intSINGLE_REVISIONConstant flag used withgetFileHistoryFor(IResource, int, IProgressMonitor)to indicate that only a single revision is desired.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IFileHistorygetFileHistoryFor(IFileStore store, int flags, IProgressMonitor monitor)Returns anIFileHistoryfor the specifiedIFileStore.IFileHistorygetFileHistoryFor(IResource resource, int flags, IProgressMonitor monitor)Returns the file history for the given in resource.IFileRevisiongetWorkspaceFileRevision(IResource resource)Returns the file revision of the passed in resource or null if that file revision cannot be determined
-
-
-
Field Detail
-
NONE
static final int NONE
Constant flag used withgetFileHistoryFor(IResource, int, IProgressMonitor)to indicate no flags.- See Also:
- Constant Field Values
-
SINGLE_REVISION
static final int SINGLE_REVISION
Constant flag used withgetFileHistoryFor(IResource, int, IProgressMonitor)to indicate that only a single revision is desired.- See Also:
- Constant Field Values
-
SINGLE_LINE_OF_DESCENT
static final int SINGLE_LINE_OF_DESCENT
Constant flag used withgetFileHistoryFor(IResource, int, IProgressMonitor)to indicate that the resulting history will be restricted to a single line-of-descent (e.g. a single branch). In this mode, theIFileHistory.getContributors(IFileRevision)andIFileHistory.getTargets(IFileRevision)should either return zero or one revision.- See Also:
- Constant Field Values
-
-
Method Detail
-
getFileHistoryFor
IFileHistory getFileHistoryFor(IResource resource, int flags, IProgressMonitor monitor)
Returns the file history for the given in resource. If the flags containsSINGLE_REVISIONthen only the revision corresponding to the base corresponding to the local resource is fetched. If the flags containsSINGLE_LINE_OF_DESCENTthe resulting history will be restricted to a single line-of-descent (e.g. a single branch). In this mode, theIFileHistory.getContributors(IFileRevision)andIFileHistory.getTargets(IFileRevision)should either return zero or one revision. If both flags are present,SINGLE_REVISIONshould take precedence.- Parameters:
resource- the resourceflags- to indicate what revisions should be included in the historymonitor- a progress monitor- Returns:
- the history of the file
-
getWorkspaceFileRevision
IFileRevision getWorkspaceFileRevision(IResource resource)
Returns the file revision of the passed in resource or null if that file revision cannot be determined- Parameters:
resource- the resource- Returns:
- the file revision belonging to the passed in resource or null
-
getFileHistoryFor
IFileHistory getFileHistoryFor(IFileStore store, int flags, IProgressMonitor monitor)
Returns anIFileHistoryfor the specifiedIFileStore.- Parameters:
store- an IFileStoreflags-SINGLE_REVISIONorSINGLE_LINE_OF_DESCENTmonitor- a progress monitor- Returns:
- the history for the IFileStore
-
-