|
Lines 43-48
Link Here
|
| 43 |
private static final String CATEGORY_ID = |
43 |
private static final String CATEGORY_ID = |
| 44 |
"org.eclipse.update.core.new-updates"; //$NON-NLS-1$ |
44 |
"org.eclipse.update.core.new-updates"; //$NON-NLS-1$ |
| 45 |
private IFeature [] features; |
45 |
private IFeature [] features; |
|
|
46 |
private boolean automatic; |
| 46 |
|
47 |
|
| 47 |
class Candidate { |
48 |
class Candidate { |
| 48 |
ArrayList children; |
49 |
ArrayList children; |
|
Lines 316-322
Link Here
|
| 316 |
private ArrayList candidates; |
317 |
private ArrayList candidates; |
| 317 |
|
318 |
|
| 318 |
public UpdatesSearchCategory() { |
319 |
public UpdatesSearchCategory() { |
|
|
320 |
this(true); |
| 321 |
} |
| 322 |
|
| 323 |
public UpdatesSearchCategory(boolean automatic) { |
| 319 |
super(CATEGORY_ID); |
324 |
super(CATEGORY_ID); |
|
|
325 |
this.automatic = automatic; |
| 320 |
} |
326 |
} |
| 321 |
|
327 |
|
| 322 |
private void collectValidHits( |
328 |
private void collectValidHits( |
|
Lines 335-346
Link Here
|
| 335 |
UpdateCore.log(job.getFeature().getVersionedIdentifier() + ": " + Messages.DefaultFeatureParser_NoLicenseText, null); //$NON-NLS-1$ |
341 |
UpdateCore.log(job.getFeature().getVersionedIdentifier() + ": " + Messages.DefaultFeatureParser_NoLicenseText, null); //$NON-NLS-1$ |
| 336 |
continue; |
342 |
continue; |
| 337 |
} |
343 |
} |
| 338 |
IStatus status; |
344 |
IStatus status = null; |
| 339 |
if( hit.getPatchedJob()==null){ |
345 |
|
| 340 |
status = OperationsManager.getValidator().validatePendingInstall(job.getOldFeature(), job.getFeature()); |
346 |
// Fix for https://bugs.eclipse.org/bugs/show_bug.cgi?id=132450 |
| 341 |
}else{ |
347 |
// Only validate for automatic updates because |
| 342 |
status = OperationsManager.getValidator().validatePendingChanges(new IInstallFeatureOperation[]{hit.getPatchedJob(), job}); |
348 |
// non-automatic once will arrive in the review wizard |
| 343 |
|
349 |
// where additional validation will be performed |
|
|
350 |
if (automatic) { |
| 351 |
if( hit.getPatchedJob()==null){ |
| 352 |
status = OperationsManager.getValidator().validatePendingInstall(job.getOldFeature(), job.getFeature()); |
| 353 |
}else{ |
| 354 |
status = OperationsManager.getValidator().validatePendingChanges(new IInstallFeatureOperation[]{hit.getPatchedJob(), job}); |
| 355 |
} |
| 344 |
} |
356 |
} |
| 345 |
if (status == null || status.getCode() == IStatus.WARNING) { |
357 |
if (status == null || status.getCode() == IStatus.WARNING) { |
| 346 |
if (hit.isPatch()) { |
358 |
if (hit.isPatch()) { |