Project: Eclipse_Platform_UI
Bug 118429 [DataBinding] Validation should use IStatus, not just Strings
Reported: 2005-11-29 10:17:13 | Status: resolved fixed

In order to use data binding in Workbench or IDE dialogs and preference pages, we need validation in terms of IStatus objects. Using strings is too simplistic. For example, look at the wizard for creating a new class. You will get a warning if the class name does not start with an uppercase letter, or if you don't provide a package name, but you will still be able to click "Finish" to proceed anyway. (Note that IStatus is currently not on the classpath, we need to re-introduce the dependency on org.eclipse.equinox.common, which contains IStatus etc.)

Files changed in fix:
bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/Diffs.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/map/ObservableMap.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/masterdetail/DetailObservableValue.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/masterdetail/MasterDetailObservables.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/BindSpec.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/BindSupportFactory.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/Binding.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/BindingEvent.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/DataBindingContext.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/DefaultBindSupportFactory.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/IBindingListener.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/Diffs.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/map/ObservableMap.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/masterdetail/DetailObservableValue.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/masterdetail/MasterDetailObservables.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/IDomainValidator.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/IValidator.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/ObjectToPrimitiveValidator.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/ReadOnlyValidator.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/RegexStringValidator.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2BytePrimitiveValidator.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2ByteValidator.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2DateValidator.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2DoublePrimitiveValidator.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2DoubleValidator.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2FloatPrimitiveValidator.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2FloatValidator.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2IntegerPrimitiveValidator.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2IntegerValidator.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2LongPrimitiveValidator.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2LongValidator.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2ShortPrimitiveValidator.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/String2ShortValidator.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/ValidationError.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/validation/ValidationStatus.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/ClassLookupSupport.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/DetailObservableValue.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/ListBinding.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/Util.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/ValidationErrorList.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/ValidationStatusMap.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/ValueBinding.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/model/Adventure.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet004DataBindingContextErrorLabel.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/databinding/observable/masterdetail/DetailObservableValueTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/factories/AbstractBindSupportFactoryTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/factories/DefaultBindSupportFactoryBooleanPrimitiveTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/factories/DefaultBindSupportFactoryBytePrimitiveTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/factories/DefaultBindSupportFactoryDoublePrimitiveTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/factories/DefaultBindSupportFactoryFloatPrimitiveTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/factories/DefaultBindSupportFactoryIntTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/factories/DefaultBindSupportFactoryLongPrimitiveTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/factories/DefaultBindSupportFactoryShortPrimitiveTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/factories/DefaultBindSupportFactoryTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/internal/databinding/provisional/validation/ObjectToPrimitiveValidatorTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/BindSpecTests.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/DatabindingContextTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/CustomBeanBindSupportFactory.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/NewTableScenarios.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/PropertyScenarios.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/ListBindingTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/ValueBindingTest.java