View | Details | Raw Unified | Return to bug 306439 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/equinox/p2/metadata/MetadataFactory.java (-1 / +8 lines)
Lines 471-477 Link Here
471
	}
471
	}
472
472
473
	public static IUpdateDescriptor createUpdateDescriptor(Collection<IMatchExpression<IInstallableUnit>> descriptors, int severity, String description, URI location) {
473
	public static IUpdateDescriptor createUpdateDescriptor(Collection<IMatchExpression<IInstallableUnit>> descriptors, int severity, String description, URI location) {
474
		return new UpdateDescriptor(descriptors, severity, description, null);
474
		return new UpdateDescriptor(descriptors, severity, description, location);
475
	}
475
	}
476
476
477
	public static IUpdateDescriptor createUpdateDescriptor(String id, VersionRange range, int severity, String description) {
477
	public static IUpdateDescriptor createUpdateDescriptor(String id, VersionRange range, int severity, String description) {
Lines 480-485 Link Here
480
		return new UpdateDescriptor(descriptors, severity, description, null);
480
		return new UpdateDescriptor(descriptors, severity, description, null);
481
	}
481
	}
482
482
483
	// FIXME should this replace the method above?
484
	public static IUpdateDescriptor createUpdateDescriptor(String id, VersionRange range, int severity, String description, URI location) {
485
		Collection<IMatchExpression<IInstallableUnit>> descriptors = new ArrayList<IMatchExpression<IInstallableUnit>>(1);
486
		descriptors.add(createMatchExpressionFromRange(IInstallableUnit.NAMESPACE_IU_ID, id, range));
487
		return new UpdateDescriptor(descriptors, severity, description, location);
488
	}
489
483
	private static final IExpression allVersionsExpression;
490
	private static final IExpression allVersionsExpression;
484
	private static final IExpression range_II_Expression;
491
	private static final IExpression range_II_Expression;
485
	private static final IExpression range_IN_Expression;
492
	private static final IExpression range_IN_Expression;
(-)src/org/eclipse/equinox/internal/p2/metadata/repository/io/MetadataParser.java (-1 / +2 lines)
Lines 808-814 Link Here
808
			String[] values = parseAttributes(attributes, required, optional);
808
			String[] values = parseAttributes(attributes, required, optional);
809
			VersionRange range = checkVersionRange(REQUIREMENT_ELEMENT, VERSION_RANGE_ATTRIBUTE, values[1]);
809
			VersionRange range = checkVersionRange(REQUIREMENT_ELEMENT, VERSION_RANGE_ATTRIBUTE, values[1]);
810
			int severity = new Integer(values[2]).intValue();
810
			int severity = new Integer(values[2]).intValue();
811
			descriptor = MetadataFactory.createUpdateDescriptor(values[0], range, severity, values[3]);
811
			URI location = parseURIAttribute(attributes, false);
812
			descriptor = MetadataFactory.createUpdateDescriptor(values[0], range, severity, values[3], location);
812
		}
813
		}
813
814
814
		public IUpdateDescriptor getUpdateDescriptor() {
815
		public IUpdateDescriptor getUpdateDescriptor() {

Return to bug 306439