Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: e8e873a10c5a25bd59ab03e78ee65ce1e917286a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*******************************************************************************
 * Copyright (c) 2009, 2011 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.compare.internal.patch;

import org.eclipse.compare.internal.core.patch.FilePatch2;
import org.eclipse.compare.patch.IFilePatch;
import org.eclipse.compare.patch.IFilePatchResult;
import org.eclipse.compare.patch.PatchConfiguration;
import org.eclipse.core.resources.IStorage;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;

public class FilePatch extends FilePatch2 implements IFilePatch {

	public FilePatch(IPath oldPath, long oldDate, IPath newPath,
			long newDate) {
		super(oldPath, oldDate, newPath, newDate);
	}

	/*
	 * (non-Javadoc)
	 *
	 * @see
	 * org.eclipse.compare.patch.IFilePatch#apply(org.eclipse.core.resources
	 * .IStorage, org.eclipse.compare.patch.PatchConfiguration,
	 * org.eclipse.core.runtime.IProgressMonitor)
	 */
	public IFilePatchResult apply(IStorage content,
			PatchConfiguration configuration, IProgressMonitor monitor) {
		return apply(content != null ? Utilities.getReaderCreator(content)
				: null, configuration, monitor);
	}

	protected FilePatch2 create(IPath oldPath, long oldDate, IPath newPath,
			long newDate) {
		return new FilePatch(oldPath, oldDate, newPath, newDate);
	}

}

Back to the top