Bug 175859 [DataBinding] Use MessageFormat for validation hints
The default hints produced by String2IntegerPrimitiveValidator and its peers are not very pleasant. They print extremely long numbers, are missing spaces, etc. For I18n, these hints should be produced via MessageFormat patterns, rather than with a hard-coded structure. This would also allow clients to override the messages by providing replacement patterns in a fragment. Boris, are there any issues with using java.text.MessageFormat under Foundation profiles? Should an ICU equivalent be used instead?
bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/UpdateValueStrategy.java
associate(Object.class, Integer.TYPE,
					new ObjectToPrimitiveValidator(Integer.TYPE));
			associate(Object.class, Byte.TYPE, new ObjectToPrimitiveValidator(
					Byte.TYPE));
			associate(Object.class, Short.TYPE, new ObjectToPrimitiveValidator(
					Short.TYPE));
			associate(Object.class, Long.TYPE, new ObjectToPrimitiveValidator(
					Long.TYPE));
			associate(Object.class, Float.TYPE, new ObjectToPrimitiveValidator(
					Float.TYPE));
			associate(Object.class, Double.TYPE,
					new ObjectToPrimitiveValidator(Double.TYPE));
			associate(Object.class, Boolean.TYPE,
					new ObjectToPrimitiveValidator(Boolean.TYPE));
		}
		/**
		 * Associate a particular validator that can validate the conversion
		 * (fromClass, toClass)
		 * 
		 * @param fromClass
		 *            The Class to convert from
		 * @param toClass
		 *            The Class to convert to
		 * @param validator
		 *            The IValidator
		 */
		private void associate(Object fromClass, Object toClass,
				IValidator validator) {
			validators.put(new Pair(fromClass, toClass), validator);
		}