Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarsten Thoms2018-02-20 16:23:39 -0500
committerKarsten Thoms2018-03-09 13:40:18 -0500
commitc31121089f93fec170f2944482a4b0ea446d48e4 (patch)
tree539f49ff53040aba299d94695958561feaef7618 /bundles
parentcc763a549b44c68e8e7bc57a9a398407a44b696b (diff)
downloadeclipse.platform.team-c31121089f93fec170f2944482a4b0ea446d48e4.tar.gz
eclipse.platform.team-c31121089f93fec170f2944482a4b0ea446d48e4.tar.xz
eclipse.platform.team-c31121089f93fec170f2944482a4b0ea446d48e4.zip
Bug 531433 - Replace usage of SubProgressMonitor by SubMonitorI20180311-2000I20180310-1500I20180309-2000
Change-Id: I68e635f60614b9a923c8c848c17115b6e9275a30 Signed-off-by: Karsten Thoms <karsten.thoms@itemis.de>
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/AddFromHistoryAction.java4
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/Patcher.java10
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/WorkspacePatcher.java8
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/StructureDiffViewer.java12
-rw-r--r--bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/Policy.java4
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/Policy.java4
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProjectSetCapability.java6
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/Policy.java4
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistory.java12
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filesystem/CVSFileSystem.java4
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filesystem/RemoteLogger.java4
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSCompareEditorInput.java4
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistoryPage.java4
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSProjectSetSerializer.java6
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/Policy.java4
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/WorkspaceAction.java4
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/TagInRepositoryOperation.java4
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Policy.java4
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RemoveSynchronizeParticipantAction.java4
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/ApplyPatchSynchronizationWizard.java4
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ProjectSetExportWizard.java6
21 files changed, 58 insertions, 58 deletions
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/AddFromHistoryAction.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/AddFromHistoryAction.java
index 1e96f9e42..63a412631 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/AddFromHistoryAction.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/AddFromHistoryAction.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 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
@@ -126,7 +126,7 @@ public class AddFromHistoryAction extends BaseCompareAction {
IFileState fileState= selected[i].fFileState;
createContainers(file);
- SubProgressMonitor subMonitor= new SubProgressMonitor(pm, 1);
+ SubMonitor subMonitor= SubMonitor.convert(pm, 1);
try {
file.create(fileState.getContents(), false, subMonitor);
} finally {
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;
}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/WorkspacePatcher.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/WorkspacePatcher.java
index 20f71f3ec..a2a66977d 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/WorkspacePatcher.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/WorkspacePatcher.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
@@ -110,18 +110,18 @@ public class WorkspacePatcher extends Patcher {
// 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;
}
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/StructureDiffViewer.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/StructureDiffViewer.java
index f6f8ace85..ac970287e 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/StructureDiffViewer.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/structuremergeviewer/StructureDiffViewer.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
@@ -28,7 +28,7 @@ import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.core.runtime.SubMonitor;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.text.BadPositionCategoryException;
import org.eclipse.jface.text.IDocument;
@@ -75,14 +75,14 @@ public class StructureDiffViewer extends DiffTreeViewer {
*/
private IRunnableWithProgress diffTask = monitor -> {
monitor.beginTask(CompareMessages.StructureDiffViewer_0, 100);
- diff(new SubProgressMonitor(monitor, 100));
+ diff(SubMonitor.convert(monitor, 100));
monitor.done();
};
private IRunnableWithProgress inputChangedTask = monitor -> {
monitor.beginTask(CompareMessages.StructureDiffViewer_1, 100);
// TODO: Should we always force
- compareInputChanged((ICompareInput) getInput(), true, new SubProgressMonitor(monitor, 100));
+ compareInputChanged((ICompareInput) getInput(), true, SubMonitor.convert(monitor, 100));
monitor.done();
};
@@ -370,7 +370,7 @@ public class StructureDiffViewer extends DiffTreeViewer {
if (monitor != null) {
if (monitor.isCanceled() || getControl().isDisposed())
throw new OperationCanceledException();
- return new SubProgressMonitor(monitor, work);
+ return SubMonitor.convert(monitor, work);
}
return null;
}
@@ -526,7 +526,7 @@ public class StructureDiffViewer extends DiffTreeViewer {
if (compareConfiguration != null) {
compareConfiguration.getContainer().run(true, true, monitor -> {
monitor.beginTask(CompareMessages.StructureDiffViewer_2, 100);
- diffTask.run(new SubProgressMonitor(monitor, 100));
+ diffTask.run(SubMonitor.convert(monitor, 100));
monitor.done();
});
}
diff --git a/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/Policy.java b/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/Policy.java
index ae2a4fb3d..b3940cc00 100644
--- a/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/Policy.java
+++ b/bundles/org.eclipse.jsch.core/src/org/eclipse/jsch/internal/core/Policy.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2007 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
@@ -31,7 +31,7 @@ public class Policy{
return new NullProgressMonitor();
if(monitor instanceof NullProgressMonitor)
return monitor;
- return new SubProgressMonitor(monitor, ticks);
+ return SubMonitor.convert(monitor, ticks);
}
}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/Policy.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/Policy.java
index 66b4b3ac8..d987299ca 100644
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/Policy.java
+++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/internal/core/Policy.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
@@ -50,7 +50,7 @@ public class Policy {
return new NullProgressMonitor();
if (monitor instanceof NullProgressMonitor)
return monitor;
- return new SubProgressMonitor(monitor, ticks);
+ return SubMonitor.convert(monitor, ticks);
}
public static IProgressMonitor infiniteSubMonitorFor(IProgressMonitor monitor, int ticks) {
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProjectSetCapability.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProjectSetCapability.java
index 9f035306c..fab9fc47e 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProjectSetCapability.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/CVSProjectSetCapability.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2010 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
@@ -33,7 +33,7 @@ import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.core.runtime.SubMonitor;
import org.eclipse.core.runtime.jobs.ISchedulingRule;
import org.eclipse.core.runtime.jobs.MultiRule;
import org.eclipse.team.core.ProjectSetCapability;
@@ -256,7 +256,7 @@ public class CVSProjectSetCapability extends ProjectSetCapability {
break;
IProject project = projects[i];
LoadInfo info = (LoadInfo) infoMap.get(project);
- if (info != null && info.checkout(new SubProgressMonitor(monitor, 1000)))
+ if (info != null && info.checkout(SubMonitor.convert(monitor, 1000)))
result.add(project);
}
}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/Policy.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/Policy.java
index 2806474be..b2cc64bd7 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/Policy.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/Policy.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2014 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
@@ -59,7 +59,7 @@ public class Policy {
return new NullProgressMonitor();
if (monitor instanceof NullProgressMonitor)
return monitor;
- return new SubProgressMonitor(monitor, ticks);
+ return SubMonitor.convert(monitor, ticks);
}
public static IProgressMonitor infiniteSubMonitorFor(IProgressMonitor monitor, int ticks) {
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistory.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistory.java
index 2ee46b6dd..953d0a302 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistory.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filehistory/CVSFileHistory.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2007 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
@@ -96,7 +96,7 @@ public class CVSFileHistory extends FileHistory {
monitor.beginTask(NLS.bind(CVSMessages.CVSFileHistory_0, cvsFile.getRepositoryRelativePath()), 300);
try {
ILogEntry[] entries = cvsFile
- .getLogEntries(new SubProgressMonitor(monitor, 200));
+ .getLogEntries(SubMonitor.convert(monitor, 200));
if (entries.length == 0){
//Get the parent folder
@@ -169,8 +169,8 @@ public class CVSFileHistory extends FileHistory {
//get the local revisions
IFileState[] localHistoryState;
try {
- localHistoryState = ((IFile) localResource).getHistory(new SubProgressMonitor(monitor, 100));
- localRevisions = convertToFileRevision(localHistoryState, new SubProgressMonitor(monitor, 100));
+ localHistoryState = ((IFile) localResource).getHistory(SubMonitor.convert(monitor, 100));
+ localRevisions = convertToFileRevision(localHistoryState, SubMonitor.convert(monitor, 100));
includesExists = (localRevisions.length > 0);
} catch (CoreException e) {
TeamException.asTeamException(e);
@@ -323,8 +323,8 @@ public class CVSFileHistory extends FileHistory {
includesExists = false;
if (localResource != null && localResource instanceof IFile) {
//get the local revisions
- IFileState[] localHistoryState = ((IFile) localResource).getHistory(new SubProgressMonitor(monitor, 100));
- localRevisions = convertToFileRevision(localHistoryState, new SubProgressMonitor(monitor, 100));
+ IFileState[] localHistoryState = ((IFile) localResource).getHistory(SubMonitor.convert(monitor, 100));
+ localRevisions = convertToFileRevision(localHistoryState, SubMonitor.convert(monitor, 100));
includesExists = (localRevisions.length > 0);
}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filesystem/CVSFileSystem.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filesystem/CVSFileSystem.java
index 93b65eee7..19285d60d 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filesystem/CVSFileSystem.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filesystem/CVSFileSystem.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2006 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
@@ -62,7 +62,7 @@ public class CVSFileSystem extends FileSystem {
try {
RemoteLogger logger = new RemoteLogger(folder);
- RemoteFolderTree remoteTree = logger.fetchTree(new SubProgressMonitor(monitor,80));
+ RemoteFolderTree remoteTree = logger.fetchTree(SubMonitor.convert(monitor,80));
HashMap folderMap = logger.getFolderMap();
HashMap logMap = logger.getLogMap();
folderMap.put(folder.getName(), remoteTree);
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filesystem/RemoteLogger.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filesystem/RemoteLogger.java
index ef76314ce..0d8917ef7 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filesystem/RemoteLogger.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/filesystem/RemoteLogger.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * Copyright (c) 2005, 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
@@ -68,7 +68,7 @@ public class RemoteLogger {
if (tag == null)
tag = CVSTag.DEFAULT;
- getRemoteChildren(tag, new SubProgressMonitor(monitor,70));
+ getRemoteChildren(tag, SubMonitor.convert(monitor,70));
final ICVSRemoteFolder project = this.remoteFolder;
//Get the entry paths
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSCompareEditorInput.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSCompareEditorInput.java
index 9f5b0e46b..8de22e87f 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSCompareEditorInput.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSCompareEditorInput.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2008 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
@@ -327,7 +327,7 @@ public class CVSCompareEditorInput extends CompareEditorInput {
// do the diff
Object result = null;
monitor.beginTask(CVSUIMessages.CVSCompareEditorInput_comparing, 30);
- IProgressMonitor sub = new SubProgressMonitor(monitor, 30);
+ IProgressMonitor sub = SubMonitor.convert(monitor, 30);
sub.beginTask(CVSUIMessages.CVSCompareEditorInput_comparing, 100);
try {
result = d.findDifferences(threeWay, sub, null, ancestor, left, right);
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistoryPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistoryPage.java
index 55d7b0535..339c3bad6 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistoryPage.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistoryPage.java
@@ -577,9 +577,9 @@ public class CVSHistoryPage extends HistoryPage implements IAdaptable, IHistoryC
monitor.beginTask(null, 100);
try {
if(confirmOverwrite() && validateChange()) {
- IStorage currentStorage = currentSelection.getStorage(new SubProgressMonitor(monitor, 50));
+ IStorage currentStorage = currentSelection.getStorage(SubMonitor.convert(monitor, 50));
InputStream in = currentStorage.getContents();
- ((IFile)file.getIResource()).setContents(in, false, true, new SubProgressMonitor(monitor, 50));
+ ((IFile)file.getIResource()).setContents(in, false, true, SubMonitor.convert(monitor, 50));
}
} catch (TeamException e) {
throw new CoreException(e.getStatus());
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSProjectSetSerializer.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSProjectSetSerializer.java
index bd43f1092..4656c2b55 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSProjectSetSerializer.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSProjectSetSerializer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2005 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
@@ -18,7 +18,7 @@ import java.util.StringTokenizer;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.SubProgressMonitor;
+import org.eclipse.core.runtime.SubMonitor;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.osgi.util.NLS;
@@ -156,7 +156,7 @@ public class CVSProjectSetSerializer implements IProjectSetSerializer {
if (locations[i] != null) {
ICVSRemoteFolder remote = new RemoteFolder(null, locations[i], modules[i], tags[i]);
new CheckoutSingleProjectOperation(null /* no part */, remote, projects[i], null /* location */, true)
- .run(new SubProgressMonitor(monitor, 1000));
+ .run(SubMonitor.convert(monitor, 1000));
}
}
} finally {
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/Policy.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/Policy.java
index 6201a9953..f261db8bd 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/Policy.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/Policy.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2014 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
@@ -53,7 +53,7 @@ public class Policy {
return new NullProgressMonitor();
if (monitor instanceof NullProgressMonitor)
return monitor;
- return new SubProgressMonitor(monitor, ticks);
+ return SubMonitor.convert(monitor, ticks);
}
public static IProgressMonitor infiniteSubMonitorFor(IProgressMonitor monitor, int ticks) {
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/WorkspaceAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/WorkspaceAction.java
index 2b538d3e1..cf614fbcb 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/WorkspaceAction.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/WorkspaceAction.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2010 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
@@ -435,7 +435,7 @@ public abstract class WorkspaceAction extends CVSAction {
Iterator iterator = keySet.iterator();
while (iterator.hasNext()) {
- IProgressMonitor subMonitor = new SubProgressMonitor(monitor, 1000);
+ IProgressMonitor subMonitor = SubMonitor.convert(monitor, 1000);
CVSTeamProvider provider = (CVSTeamProvider)iterator.next();
List list = (List)table.get(provider);
IResource[] providerResources = (IResource[])list.toArray(new IResource[list.size()]);
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/TagInRepositoryOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/TagInRepositoryOperation.java
index dd6d9c2a5..1e86a0635 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/TagInRepositoryOperation.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/TagInRepositoryOperation.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2011 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
@@ -40,7 +40,7 @@ public class TagInRepositoryOperation extends RemoteOperation implements ITagOpe
ICVSRemoteResource[] resources = getRemoteResources();
monitor.beginTask(null, 1000 * resources.length);
for (int i = 0; i < resources.length; i++) {
- IStatus status = resources[i].tag(getTag(), getLocalOptions(), new SubProgressMonitor(monitor, 1000));
+ IStatus status = resources[i].tag(getTag(), getLocalOptions(), SubMonitor.convert(monitor, 1000));
collectStatus(status);
}
if (!errorsOccurred()) {
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Policy.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Policy.java
index 28c30b8f4..8a189a8b0 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Policy.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Policy.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
@@ -66,7 +66,7 @@ public class Policy {
return new NullProgressMonitor();
if (monitor instanceof NullProgressMonitor)
return monitor;
- return new SubProgressMonitor(monitor, ticks);
+ return SubMonitor.convert(monitor, ticks);
}
public static IProgressMonitor monitorFor(IProgressMonitor monitor) {
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RemoveSynchronizeParticipantAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RemoveSynchronizeParticipantAction.java
index 1bfc684c4..4dae74987 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RemoveSynchronizeParticipantAction.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/actions/RemoveSynchronizeParticipantAction.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
@@ -176,7 +176,7 @@ public class RemoveSynchronizeParticipantAction extends Action {
Saveable model = (Saveable) i.next();
if (model.isDirty()) {
try {
- model.doSave(new SubProgressMonitor(monitor, 1));
+ model.doSave(SubMonitor.convert(monitor, 1));
} catch (CoreException e) {
ErrorDialog.openError(view.getSite().getShell(), null, e.getMessage(), e.getStatus());
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/ApplyPatchSynchronizationWizard.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/ApplyPatchSynchronizationWizard.java
index 509fd2b11..4cf400ef2 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/ApplyPatchSynchronizationWizard.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/patch/ApplyPatchSynchronizationWizard.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2010 IBM Corporation and others.
+ * Copyright (c) 2009, 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
@@ -163,7 +163,7 @@ public class ApplyPatchSynchronizationWizard extends PatchWizard implements
for (int i = 0; i < projects.length; i++) {
IProject project = projects[i];
try {
- project.open(new SubProgressMonitor(monitor, 1));
+ project.open(SubMonitor.convert(monitor, 1));
} catch (CoreException e) {
errorStatus.add(e.getStatus());
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ProjectSetExportWizard.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ProjectSetExportWizard.java
index 3a972d55c..8c62beb40 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ProjectSetExportWizard.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/wizards/ProjectSetExportWizard.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
@@ -131,7 +131,7 @@ public class ProjectSetExportWizard extends Wizard implements IExportWizard {
ProjectSetCapability serializer = providerType.getProjectSetCapability();
ProjectSetCapability.ensureBackwardsCompatible(providerType, serializer);
if (serializer != null) {
- String[] references = serializer.asReference(projectArray, context, new SubProgressMonitor(monitor, 990));
+ String[] references = serializer.asReference(projectArray, context, SubMonitor.convert(monitor, 990));
for (int i = 0; i < references.length; i++) {
IMemento proj = memento.createChild("project"); //$NON-NLS-1$
proj.putString("reference", references[i]); //$NON-NLS-1$
@@ -175,7 +175,7 @@ public class ProjectSetExportWizard extends Wizard implements IExportWizard {
if (type != null) {
ProjectSetCapability capability = type.getProjectSetCapability();
if (capability != null) {
- capability.projectSetCreated(file, context, new SubProgressMonitor(monitor, 10));
+ capability.projectSetCreated(file, context, SubMonitor.convert(monitor, 10));
}
}
}

Back to the top