|
Lines 289-296
Link Here
|
| 289 |
return satisfyMetaRequirements(p.getProperties()); |
289 |
return satisfyMetaRequirements(p.getProperties()); |
| 290 |
} |
290 |
} |
| 291 |
|
291 |
|
| 292 |
//Return the set of IUs representing the complete future state of the profile to satisfy the request or return a ProvisioningPlan when the request can not be satisfied |
|
|
| 293 |
private Object getSolutionFor(ProfileChangeRequest profileChangeRequest, ProvisioningContext context, IProgressMonitor monitor) { |
292 |
private Object getSolutionFor(ProfileChangeRequest profileChangeRequest, ProvisioningContext context, IProgressMonitor monitor) { |
|
|
293 |
Object solution = getBasicSolutionFor(profileChangeRequest, context, monitor); |
| 294 |
if (solution instanceof Projector) { |
| 295 |
ProvisioningContext ctx = new ProvisioningContext(new URI[0]); |
| 296 |
ctx.setExtraIUs(new ArrayList(((Projector) solution).extractSolution())); |
| 297 |
solution = null; |
| 298 |
ctx.setProperty(INCLUDE_PROFILE_IUS, "false"); //$NON-NLS-1$ |
| 299 |
return getBasicSolutionFor(profileChangeRequest, ctx, monitor); |
| 300 |
} |
| 301 |
return solution; |
| 302 |
} |
| 303 |
|
| 304 |
//Return the set of IUs representing the complete future state of the profile to satisfy the request or return a ProvisioningPlan when the request can not be satisfied |
| 305 |
private Object getBasicSolutionFor(ProfileChangeRequest profileChangeRequest, ProvisioningContext context, IProgressMonitor monitor) { |
| 294 |
SubMonitor sub = SubMonitor.convert(monitor, ExpandWork); |
306 |
SubMonitor sub = SubMonitor.convert(monitor, ExpandWork); |
| 295 |
sub.setTaskName(Messages.Director_Task_Resolving_Dependencies); |
307 |
sub.setTaskName(Messages.Director_Task_Resolving_Dependencies); |
| 296 |
try { |
308 |
try { |
|
Lines 310-315
Link Here
|
| 310 |
|
322 |
|
| 311 |
Slicer slicer = new Slicer(new QueryableArray(availableIUs), newSelectionContext, satisfyMetaRequirements(profileChangeRequest.getProfileProperties())); |
323 |
Slicer slicer = new Slicer(new QueryableArray(availableIUs), newSelectionContext, satisfyMetaRequirements(profileChangeRequest.getProfileProperties())); |
| 312 |
IQueryable slice = slicer.slice(new IInstallableUnit[] {(IInstallableUnit) updatedPlan[0]}, sub.newChild(ExpandWork / 4)); |
324 |
IQueryable slice = slicer.slice(new IInstallableUnit[] {(IInstallableUnit) updatedPlan[0]}, sub.newChild(ExpandWork / 4)); |
|
|
325 |
// Why w = new Why(slice); |
| 326 |
// w.why("org.eclipse.tptp.platform.agentcontroller", (IInstallableUnit) updatedPlan[0]); |
| 327 |
// w.why("org.eclipse.tptp.platform.iac.administrator", (IInstallableUnit) updatedPlan[0]); |
| 313 |
if (slice == null) |
328 |
if (slice == null) |
| 314 |
return new ProvisioningPlan(slicer.getStatus(), profileChangeRequest, null); |
329 |
return new ProvisioningPlan(slicer.getStatus(), profileChangeRequest, null); |
| 315 |
Projector projector = new Projector(slice, newSelectionContext, satisfyMetaRequirements(profileChangeRequest.getProfileProperties())); |
330 |
Projector projector = new Projector(slice, newSelectionContext, satisfyMetaRequirements(profileChangeRequest.getProfileProperties())); |