Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarsten Thoms2018-02-20 21:23:39 +0000
committerKarsten Thoms2018-03-09 18:40:18 +0000
commitc31121089f93fec170f2944482a4b0ea446d48e4 (patch)
tree539f49ff53040aba299d94695958561feaef7618 /bundles/org.eclipse.team.cvs.ui
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/org.eclipse.team.cvs.ui')
-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
6 files changed, 13 insertions, 13 deletions
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()) {

Back to the top