Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Xenos2015-11-13 21:21:47 -0500
committerStefan Xenos2015-11-13 21:21:47 -0500
commit8daabc702115b39bf52b561ad8e581b533661dc1 (patch)
treee456bdf25ab90b3723edece17770ff514085388b
parent78844f9e5fd4b51fb1e43bd0317b7cb2e9d38d58 (diff)
downloadrt.equinox.p2-8daabc702115b39bf52b561ad8e581b533661dc1.tar.gz
rt.equinox.p2-8daabc702115b39bf52b561ad8e581b533661dc1.tar.xz
rt.equinox.p2-8daabc702115b39bf52b561ad8e581b533661dc1.zip
Bug 482066 - Fix minor progress reporting issueI20151117-0800
Change-Id: I7f3ddb2ef53b2d02f2365feb52ed458c0eb1ee0a Signed-off-by: Stefan Xenos <sxenos@gmail.com>
-rw-r--r--bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/RequestFlexer.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/RequestFlexer.java b/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/RequestFlexer.java
index f12067d70..cb1a3ca70 100644
--- a/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/RequestFlexer.java
+++ b/bundles/org.eclipse.equinox.p2.operations/src/org/eclipse/equinox/internal/p2/operations/RequestFlexer.java
@@ -221,6 +221,7 @@ public class RequestFlexer {
}
private IProvisioningPlan resolve(IProfileChangeRequest temporaryRequest, IProgressMonitor monitor) {
+ SubMonitor subMonitor = SubMonitor.convert(monitor, 1);
String explainPropertyBackup = null;
try {
temporaryRequest.setProfileProperty("_internal_user_defined_", "true"); //$NON-NLS-1$//$NON-NLS-2$
@@ -228,7 +229,7 @@ public class RequestFlexer {
explainPropertyBackup = provisioningContext.getProperty(EXPLANATION_ENABLEMENT);
provisioningContext.setProperty(EXPLANATION_ENABLEMENT, Boolean.FALSE.toString());
}
- return planner.getProvisioningPlan(temporaryRequest, provisioningContext, SubMonitor.convert(monitor));
+ return planner.getProvisioningPlan(temporaryRequest, provisioningContext, subMonitor.split(1));
} finally {
if (provisioningContext != null) {
if (explainPropertyBackup == null)
@@ -244,8 +245,10 @@ public class RequestFlexer {
private void loosenUpOriginalRequest(IProfileChangeRequest newRequest, IProfileChangeRequest originalRequest, IProgressMonitor monitor) {
//First deal with the IUs that are being added
Collection<IInstallableUnit> requestedAdditions = originalRequest.getAdditions();
+ SubMonitor subMonitor = SubMonitor.convert(monitor, requestedAdditions.size());
for (IInstallableUnit addedIU : requestedAdditions) {
- Collection<IInstallableUnit> potentialUpdates = allowDifferentVersion ? findAllVersionsAvailable(addedIU, monitor) : new ArrayList<IInstallableUnit>();
+ SubMonitor iterationMonitor = subMonitor.split(1);
+ Collection<IInstallableUnit> potentialUpdates = allowDifferentVersion ? findAllVersionsAvailable(addedIU, iterationMonitor) : new ArrayList<IInstallableUnit>();
foundDifferentVersionsForElementsToInstall = (foundDifferentVersionsForElementsToInstall || (potentialUpdates.size() == 0 ? false : true));
potentialUpdates.add(addedIU); //Make sure that we include the IU that we were initially trying to install
@@ -313,8 +316,9 @@ public class RequestFlexer {
}
private Collection<IInstallableUnit> findUpdates(IInstallableUnit iu, IProgressMonitor monitor) {
+ SubMonitor subMonitor = SubMonitor.convert(monitor, 1);
Collection<IInstallableUnit> availableUpdates = new HashSet<IInstallableUnit>();
- IQueryResult<IInstallableUnit> updatesAvailable = planner.updatesFor(iu, provisioningContext, SubMonitor.convert(monitor));
+ IQueryResult<IInstallableUnit> updatesAvailable = planner.updatesFor(iu, provisioningContext, subMonitor.split(1));
for (Iterator<IInstallableUnit> iterator = updatesAvailable.iterator(); iterator.hasNext();) {
availableUpdates.add(iterator.next());
}

Back to the top