Interface IFilePatch

    • Field Detail

      • DATE_UNKNOWN

        static final long DATE_UNKNOWN
        Special constant that will be returned from get getBeforeDate() or getAfterDate() if the date is unknown. Equal to Midnight, Jan 1, 1970 GMT.
        Since:
        3.4
        See Also:
        Constant Field Values
    • Method Detail

      • apply

        IFilePatchResult apply​(IStorage contents,
                               PatchConfiguration configuration,
                               IProgressMonitor monitor)
        Apply this patch to the given file contents. The result provides the original and patch contents and also indicates whether some portions of the patch (called hunks) failed to apply.
        Parameters:
        contents - the file contents
        configuration - the patch configuration
        monitor - a progress monitor
        Returns:
        the result of the patch application
      • getHeader

        String getHeader()
        Return the header information of the patch or null if there was no header text. The header may be multi-line.
        Specified by:
        getHeader in interface IFilePatch2
        Returns:
        the header information of the patch or null
      • getBeforeDate

        long getBeforeDate()
        Returns the milliseconds time value of the before date from the patch, or DATE_UNKNOWN if the date is unknown.
        Specified by:
        getBeforeDate in interface IFilePatch2
        Returns:
        milliseconds time value of the before date from the patch
        Since:
        3.4
      • getAfterDate

        long getAfterDate()
        Returns the milliseconds time value of the after date from the patch, or DATE_UNKNOWN if the date is unknown.
        Specified by:
        getAfterDate in interface IFilePatch2
        Returns:
        milliseconds time value of the after date from the patch
        Since:
        3.4