Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 132450
Collapse All | Expand All

(-)src/org/eclipse/update/internal/operations/UpdateUtils.java (-1 / +5 lines)
Lines 393-401 Link Here
393
//	}
393
//	}
394
	
394
	
395
	public static UpdateSearchRequest createNewUpdatesRequest(IFeature [] features) {
395
	public static UpdateSearchRequest createNewUpdatesRequest(IFeature [] features) {
396
		return createNewUpdatesRequest(features, true);
397
	}
398
	
399
	public static UpdateSearchRequest createNewUpdatesRequest(IFeature [] features, boolean automatic) {
396
		UpdateSearchScope scope = new UpdateSearchScope();
400
		UpdateSearchScope scope = new UpdateSearchScope();
397
		scope.setUpdateMapURL(UpdateUtils.getUpdateMapURL());
401
		scope.setUpdateMapURL(UpdateUtils.getUpdateMapURL());
398
		UpdatesSearchCategory category = new UpdatesSearchCategory();
402
		UpdatesSearchCategory category = new UpdatesSearchCategory(automatic);
399
		if (features!=null)
403
		if (features!=null)
400
			category.setFeatures(features);
404
			category.setFeatures(features);
401
		UpdateSearchRequest searchRequest = new UpdateSearchRequest(category, scope);
405
		UpdateSearchRequest searchRequest = new UpdateSearchRequest(category, scope);
(-)src/org/eclipse/update/internal/search/UpdatesSearchCategory.java (-6 / +18 lines)
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()) {
(-)src/org/eclipse/update/internal/ui/wizards/ModeSelectionPage.java (-1 / +1 lines)
Lines 59-65 Link Here
59
59
60
	private void initializeSearch() {
60
	private void initializeSearch() {
61
		if (searchRequest!=null) return;
61
		if (searchRequest!=null) return;
62
		searchRequest = UpdateUtils.createNewUpdatesRequest(null);
62
		searchRequest = UpdateUtils.createNewUpdatesRequest(null, false);
63
	}
63
	}
64
64
65
	/* (non-Javadoc)
65
	/* (non-Javadoc)
(-)src/org/eclipse/update/ui/UpdateJob.java (-1 / +1 lines)
Lines 115-121 Link Here
115
		this.isAutomatic = isAutomatic;
115
		this.isAutomatic = isAutomatic;
116
		this.download = download;
116
		this.download = download;
117
		updates = new ArrayList();
117
		updates = new ArrayList();
118
		searchRequest = UpdateUtils.createNewUpdatesRequest(features);
118
		searchRequest = UpdateUtils.createNewUpdatesRequest(features, isAutomatic);
119
		setPriority(Job.DECORATE);
119
		setPriority(Job.DECORATE);
120
		mirrorIndex = 0;
120
		mirrorIndex = 0;
121
	}
121
	}

Return to bug 132450