Project: Eclipse_Platform_UI
Bug 167450 [DataBinding] Get rid of bind support factory magic
Reported: 2006-12-11 11:44:38 | Status: verified fixed

I finally realized that we don't need that other magic factory. I'll move fillBindSpecDefaults() and the methods it calls (createConverter, createValidator etc) to a new class DefaultBindSpec. Clients who want default validators and converters created for them just create a DefaultBindSpec as opposed to a (rather empty) BindSpec. I will also move the early type checking into DefaultBindSpec to make it optional as well.

Files changed in fix:
bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/IObservableCollection.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/DataBindingContext.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/DefaultBindSpec.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/DefaultBindSupportFactory.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2Boolean.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2Byte.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2Double.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2Float.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2Integer.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2Long.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/conversion/ConvertString2Short.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/IObservableCollection.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/ValueBinding.java bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/OrderedTreeNode.java bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/UnorderedTreeNode.java bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/provisional/swt/SWTUtil.java bundles/org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/provisional/swt/WorkQueue.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/databinding/observable/map/ObservableMapTest.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/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/CustomBeanBindSpec.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/PropertyScenarios.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/TextControlScenario.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/ValueBindingTest.java