diff options
author | Susan Franklin | 2008-07-31 20:55:41 +0000 |
---|---|---|
committer | Susan Franklin | 2008-07-31 20:55:41 +0000 |
commit | 0d6cdd4048c634a8a824a5292809644eac8940e7 (patch) | |
tree | f0049ca8579430de5839b8e6bfc704827f2ed33a /bundles/org.eclipse.equinox.p2.director/src | |
parent | d247fe323ea5d866807b2b0a09c95a74d832b5a7 (diff) | |
download | rt.equinox.p2-0d6cdd4048c634a8a824a5292809644eac8940e7.tar.gz rt.equinox.p2-0d6cdd4048c634a8a824a5292809644eac8940e7.tar.xz rt.equinox.p2-0d6cdd4048c634a8a824a5292809644eac8940e7.zip |
Bug 242457 - Progress should indicate that we are computing explanations
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.director/src')
4 files changed, 21 insertions, 2 deletions
diff --git a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Messages.java b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Messages.java index 657a0bc56..6e73c9734 100644 --- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Messages.java +++ b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/Messages.java @@ -40,6 +40,7 @@ public class Messages extends NLS { public static String Planner_Trivial_exception; public static String Planner_Unsatisfiable_problem; public static String Planner_Unsatisfied_dependency; + public static String Planner_NoSolution; public static String Old_Resolver_Several_Versions; public static String Old_Resolver_Incompatible_Versions; diff --git a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/NewDependencyExpander.java b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/NewDependencyExpander.java index db6ecf6c3..7d403dd80 100644 --- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/NewDependencyExpander.java +++ b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/NewDependencyExpander.java @@ -267,9 +267,21 @@ public class NewDependencyExpander { toAdd.addAll(alreadyInstalled); do { //reset work at each iteration, then use up a third. This results in an infinite series where remaining ticks gets steadily smaller + if (p.isCanceled()) { + problems.add(Status.CANCEL_STATUS); + return; + } p.setWorkRemaining(100); extractVisibilityData(toAdd); + if (p.isCanceled()) { + problems.add(Status.CANCEL_STATUS); + return; + } extractRequirements(toAdd); + if (p.isCanceled()) { + problems.add(Status.CANCEL_STATUS); + return; + } toAdd = collectMatches(toAdd, problems); p.worked(33); } while (toAdd.size() != 0); @@ -279,6 +291,10 @@ public class NewDependencyExpander { // return; invokeResolver(problems); // if (problems.isOK()) + if (p.isCanceled()) { + problems.add(Status.CANCEL_STATUS); + return; + } extractSolution(); } diff --git a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/SimplePlanner.java b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/SimplePlanner.java index e312d8e55..be2193b09 100644 --- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/SimplePlanner.java +++ b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/SimplePlanner.java @@ -241,8 +241,8 @@ public class SimplePlanner implements IPlanner { Projector projector = new Projector(slice, newSelectionContext); projector.encode(allIUs, sub.newChild(ExpandWork / 4)); IStatus s = projector.invokeSolver(sub.newChild(ExpandWork / 4)); - if (s.getSeverity() == IStatus.ERROR) { + sub.setTaskName(Messages.Planner_NoSolution); //log the error from the new solver so it is not lost LogHelper.log(s); if (!"true".equalsIgnoreCase(context == null ? null : context.getProperty("org.eclipse.equinox.p2.disable.error.reporting"))) { diff --git a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/messages.properties b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/messages.properties index 3439b1b4c..c22af9218 100644 --- a/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/messages.properties +++ b/bundles/org.eclipse.equinox.p2.director/src/org/eclipse/equinox/internal/p2/director/messages.properties @@ -13,7 +13,7 @@ Director_Revert_Problems=Problems occurred while reverting the install. Director_Unexpected_IU=The installable unit {0} can not be used here. Director_Task_Installing=Installing into {0} Director_Task_Updating=Updating -Director_Task_Resolving_Dependencies=Resolving dependencies +Director_Task_Resolving_Dependencies=Calculating requirements and dependencies. Director_Unsatisfied_Dependencies=\ Cannot complete the install because some dependencies are not satisfiable @@ -28,5 +28,7 @@ Planner_Trivial_exception=No solution found because of a trivial contradiction i Planner_Unsatisfiable_problem=No solution found because the problem in {0} is unsatisfiable. Planner_Unsatisfied_dependency=Unable to satisfy dependency from {0} to {1}. +Planner_NoSolution=Cannot complete the request. Generating details. + Old_Resolver_Several_Versions=Cannot find a solution satisfying the following requirements {0}. Old_Resolver_Incompatible_Versions=Cannot find a solution where both {0} and {1} can be satisfied.
\ No newline at end of file |