diff options
Diffstat (limited to 'bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Patcher.java')
-rw-r--r-- | bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Patcher.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Patcher.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Patcher.java index cda13f343..c0fc532a4 100644 --- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Patcher.java +++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Patcher.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2017 IBM Corporation and others. + * Copyright (c) 2000, 2018 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 @@ -52,7 +52,7 @@ import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.Path; import org.eclipse.core.runtime.Platform; -import org.eclipse.core.runtime.SubProgressMonitor; +import org.eclipse.core.runtime.SubMonitor; import org.eclipse.core.runtime.preferences.IScopeContext; import org.eclipse.core.runtime.preferences.InstanceScope; import org.eclipse.jface.text.TextUtilities; @@ -290,18 +290,18 @@ public class Patcher implements IHunkFilter { // patch it and collect rejected hunks List<String> result= apply(diff, file, true, failed); if (result != null) - store(LineReader.createString(isPreserveLineDelimeters(), result), file, new SubProgressMonitor(pm, workTicks)); + store(LineReader.createString(isPreserveLineDelimeters(), result), file, SubMonitor.convert(pm, workTicks)); workTicks-= WORK_UNIT; break; case FilePatch2.DELETION: - file.delete(true, true, new SubProgressMonitor(pm, workTicks)); + file.delete(true, true, SubMonitor.convert(pm, workTicks)); workTicks-= WORK_UNIT; break; case FilePatch2.CHANGE: // patch it and collect rejected hunks result= apply(diff, file, false, failed); if (result != null) - store(LineReader.createString(isPreserveLineDelimeters(), result), file, new SubProgressMonitor(pm, workTicks)); + store(LineReader.createString(isPreserveLineDelimeters(), result), file, SubMonitor.convert(pm, workTicks)); workTicks-= WORK_UNIT; break; } |