IObservableValue destination) {
Object sourceType = source.getValueType();
Object destinationType = destination.getValueType();
if (provideDefaults && sourceType != null && destinationType != null) {
if (converter == null) {
IConverter converter = createConverter(sourceType,
destinationType);
defaultedConverter = (converter != null);
setConverter(converter);
}
if (afterGetValidator == null) {
afterGetValidator = createValidator(sourceType, destinationType);
}
}
if (converter != null) {
if (sourceType != null) {
checkAssignable(converter.getFromType(), sourceType,
"converter does not convert from type " + sourceType); //$NON-NLS-1$
}
if (destinationType != null) {
checkAssignable(destinationType, converter.getToType(),
"converter does not convert to type " + destinationType); //$NON-NLS-1$
}
}
}