public interface IFilePatch extends IFilePatch2
ApplyPatchOperation.parsePatch(org.eclipse.core.resources.IStorage)
ApplyPatchOperation.parsePatch(org.eclipse.core.resources.IStorage)
.Modifier and Type | Field and Description |
---|---|
static long |
DATE_UNKNOWN
Special constant that will be returned from get getBeforeDate() or
getAfterDate() if the date is unknown.
|
Modifier and Type | Method and Description |
---|---|
IFilePatchResult |
apply(IStorage contents,
PatchConfiguration configuration,
IProgressMonitor monitor)
Apply this patch to the given file contents.
|
long |
getAfterDate()
Returns the milliseconds time value of the after date from the patch, or
DATE_UNKNOWN if the date is unknown.
|
long |
getBeforeDate()
Returns the milliseconds time value of the before date from the patch, or
DATE_UNKNOWN if the date is unknown.
|
String |
getHeader()
Return the header information of the patch or
null if there was no header text. |
IPath |
getTargetPath(PatchConfiguration configuration)
Return the target path for this patch.
|
apply, getHunks
static final long DATE_UNKNOWN
IPath getTargetPath(PatchConfiguration configuration)
getTargetPath
in interface IFilePatch2
configuration
- the patch configurationPatchConfiguration.isReversed()
IFilePatchResult apply(IStorage contents, PatchConfiguration configuration, IProgressMonitor monitor)
contents
- the file contentsconfiguration
- the patch configurationmonitor
- a progress monitorString getHeader()
null
if there was no header text.
The header may be multi-line.getHeader
in interface IFilePatch2
null
long getBeforeDate()
getBeforeDate
in interface IFilePatch2
long getAfterDate()
getAfterDate
in interface IFilePatch2
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.