Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarsten Thoms2018-02-20 15:26:54 -0500
committerAlexander Kurtakov2018-02-22 04:22:31 -0500
commit9009085b72e9507fdc4b7d0adb87883adefc5637 (patch)
treec4ce8132adbb62d954c57868839f65be21f1dd1e
parentb8aac321885c70774d225f69bf5fe7e397ac20c3 (diff)
downloadrt.equinox.p2-9009085b72e9507fdc4b7d0adb87883adefc5637.tar.gz
rt.equinox.p2-9009085b72e9507fdc4b7d0adb87883adefc5637.tar.xz
rt.equinox.p2-9009085b72e9507fdc4b7d0adb87883adefc5637.zip
Bug 531430 - Replace usage of SubProgressMonitor by SubMonitorI20180226-2000I20180225-2000I20180224-1500I20180223-2000I20180222-2000
Change-Id: Iea476f0ceb12d83224e0274c1d6a53c49b81adce Signed-off-by: Karsten Thoms <karsten.thoms@itemis.de>
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/DownloadJob.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/BundleDiscoveryStrategy.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/RemoteBundleDiscoveryStrategy.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/Catalog.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/ProfileModificationJob.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.transport.ecf/src/org/eclipse/equinox/internal/p2/transport/ecf/FileReader.java4
-rw-r--r--bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/operations/DiscoveryInstallOperation.java2
-rw-r--r--bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/QueryableUpdates.java2
8 files changed, 10 insertions, 10 deletions
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/DownloadJob.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/DownloadJob.java
index 4eb2f8cb4..fc63b2bea 100644
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/DownloadJob.java
+++ b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/simple/DownloadJob.java
@@ -53,7 +53,7 @@ public class DownloadJob extends Job {
if (masterMonitor.isCanceled())
return Status.CANCEL_STATUS;
// process the actual request
- SubProgressMonitor subMonitor = new SubProgressMonitor(masterMonitor, 1);
+ SubMonitor subMonitor = SubMonitor.convert(masterMonitor, 1);
subMonitor.beginTask("", 1); //$NON-NLS-1$
try {
IStatus status = repository.getArtifact(request, subMonitor);
diff --git a/bundles/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/BundleDiscoveryStrategy.java b/bundles/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/BundleDiscoveryStrategy.java
index b394ba8b0..a83a829f9 100644
--- a/bundles/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/BundleDiscoveryStrategy.java
+++ b/bundles/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/BundleDiscoveryStrategy.java
@@ -42,7 +42,7 @@ public class BundleDiscoveryStrategy extends AbstractDiscoveryStrategy {
monitor.beginTask(Messages.BundleDiscoveryStrategy_task_loading_local_extensions, extensions.length == 0 ? 1 : extensions.length);
try {
if (extensions.length > 0) {
- processExtensions(new SubProgressMonitor(monitor, extensions.length), extensions);
+ processExtensions(SubMonitor.convert(monitor, extensions.length), extensions);
}
} finally {
monitor.done();
diff --git a/bundles/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/RemoteBundleDiscoveryStrategy.java b/bundles/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/RemoteBundleDiscoveryStrategy.java
index 0a21f6332..aa930162b 100644
--- a/bundles/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/RemoteBundleDiscoveryStrategy.java
+++ b/bundles/org.eclipse.equinox.p2.discovery.compatibility/src/org/eclipse/equinox/internal/p2/discovery/compatibility/RemoteBundleDiscoveryStrategy.java
@@ -81,7 +81,7 @@ public class RemoteBundleDiscoveryStrategy extends BundleDiscoveryStrategy {
TransportUtil.readResource(new URI(directoryUrl), reader -> {
DirectoryParser parser = new DirectoryParser();
temp[0] = parser.parse(reader);
- }, new SubProgressMonitor(monitor, ticksTenPercent));
+ }, SubMonitor.convert(monitor, ticksTenPercent));
directory = temp[0];
if (directory == null) {
throw new IllegalStateException();
@@ -160,7 +160,7 @@ public class RemoteBundleDiscoveryStrategy extends BundleDiscoveryStrategy {
if (extensionPoint != null) {
IExtension[] extensions = extensionPoint.getExtensions();
if (extensions.length > 0) {
- processExtensions(new SubProgressMonitor(monitor, ticksTenPercent * 3), extensions);
+ processExtensions(SubMonitor.convert(monitor, ticksTenPercent * 3), extensions);
}
}
} finally {
diff --git a/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/Catalog.java b/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/Catalog.java
index 62874cf5d..28f7dc512 100644
--- a/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/Catalog.java
+++ b/bundles/org.eclipse.equinox.p2.discovery/src/org/eclipse/equinox/internal/p2/discovery/Catalog.java
@@ -82,7 +82,7 @@ public class Catalog {
discoveryStrategy.setCertifications(newCertifications);
discoveryStrategy.setTags(newTags);
try {
- discoveryStrategy.performDiscovery(new SubProgressMonitor(monitor, discoveryTicks / discoveryStrategies.size()));
+ discoveryStrategy.performDiscovery(SubMonitor.convert(monitor, discoveryTicks / discoveryStrategies.size()));
} catch (CoreException e) {
status.add(new Status(IStatus.ERROR, DiscoveryCore.ID_PLUGIN, NLS.bind(Messages.Catalog_Strategy_failed_Error, discoveryStrategy.getClass().getSimpleName()), e));
}
diff --git a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/ProfileModificationJob.java b/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/ProfileModificationJob.java
index abf920518..658ede97e 100644
--- a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/ProfileModificationJob.java
+++ b/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/p2/operations/ProfileModificationJob.java
@@ -70,7 +70,7 @@ public class ProfileModificationJob extends ProvisioningJob implements IProfileC
task = getName();
monitor.beginTask(task, 1000);
try {
- status = getSession().performProvisioningPlan(plan, phaseSet, provisioningContext, new SubProgressMonitor(monitor, 1000));
+ status = getSession().performProvisioningPlan(plan, phaseSet, provisioningContext, SubMonitor.convert(monitor, 1000));
} finally {
monitor.done();
}
diff --git a/bundles/org.eclipse.equinox.p2.transport.ecf/src/org/eclipse/equinox/internal/p2/transport/ecf/FileReader.java b/bundles/org.eclipse.equinox.p2.transport.ecf/src/org/eclipse/equinox/internal/p2/transport/ecf/FileReader.java
index 4053be331..f364f3190 100644
--- a/bundles/org.eclipse.equinox.p2.transport.ecf/src/org/eclipse/equinox/internal/p2/transport/ecf/FileReader.java
+++ b/bundles/org.eclipse.equinox.p2.transport.ecf/src/org/eclipse/equinox/internal/p2/transport/ecf/FileReader.java
@@ -42,9 +42,9 @@ public final class FileReader extends FileTransferJob implements IFileTransferLi
* Since we are running a job that will always be blocked by another job that
* is actually performing the transfer, these messages are unnecessary and ugly.
*/
- static class SuppressBlockedMonitor extends SubProgressMonitor {
+ static class SuppressBlockedMonitor extends ProgressMonitorWrapper {
public SuppressBlockedMonitor(IProgressMonitor monitor, int ticks) {
- super(monitor, ticks);
+ super(SubMonitor.convert(monitor, ticks));
}
@Override
diff --git a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/operations/DiscoveryInstallOperation.java b/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/operations/DiscoveryInstallOperation.java
index 340665579..716390d98 100644
--- a/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/operations/DiscoveryInstallOperation.java
+++ b/bundles/org.eclipse.equinox.p2.ui.discovery/src/org/eclipse/equinox/internal/p2/ui/discovery/operations/DiscoveryInstallOperation.java
@@ -97,7 +97,7 @@ public class DiscoveryInstallOperation implements IRunnableWithProgress {
private InstallOperation resolve(IProgressMonitor monitor, final IInstallableUnit[] ius, URI[] repositories) {
final InstallOperation installOperation = provisioningUI.getInstallOperation(Arrays.asList(ius), repositories);
- installOperation.resolveModal(new SubProgressMonitor(monitor, installableConnectors.size()));
+ installOperation.resolveModal(SubMonitor.convert(monitor, installableConnectors.size()));
return installOperation;
}
diff --git a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/QueryableUpdates.java b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/QueryableUpdates.java
index ac2ed0f05..a6e950616 100644
--- a/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/QueryableUpdates.java
+++ b/bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/query/QueryableUpdates.java
@@ -47,7 +47,7 @@ public class QueryableUpdates implements IQueryable<IInstallableUnit> {
for (int i = 0; i < iusToUpdate.length; i++) {
if (monitor.isCanceled())
return Collector.emptyCollector();
- IQueryResult<IInstallableUnit> updates = planner.updatesFor(iusToUpdate[i], new ProvisioningContext(ui.getSession().getProvisioningAgent()), new SubProgressMonitor(monitor, totalWork / 2 / iusToUpdate.length));
+ IQueryResult<IInstallableUnit> updates = planner.updatesFor(iusToUpdate[i], new ProvisioningContext(ui.getSession().getProvisioningAgent()), SubMonitor.convert(monitor, totalWork / 2 / iusToUpdate.length));
allUpdates.addAll(updates.toUnmodifiableSet());
}
return query.perform(allUpdates.iterator());

Back to the top