Project: Eclipse_Platform_UI
Bug 172193 [DataBinding] Binding customization story
Reported: 2007-01-30 12:16:29 | Status: verified fixed

From IM... 10:12:10 PM brad: this is sort of a short in the dark but do you get confused by the method names in BindSpec? when i look at BindSpec i always think of either target -> model or model -> target. i'm not sure if i could come up with a way that wouldn't be as confusing to me but was curious if it confuses you at all. 10:13:04 PM boris: Two BindSpec, one for each direction? 10:15:21 PM brad: not exactly. what i get confused about are methods like setTargetToModelConverter and setTargetUpdatePolicy. (this is probably silly) but when i think of any set for target i always think of going from target to model. but instead setTargetToModel goes from target to model but setTargetUpdatePolicy is for model to target. 10:15:46 PM brad: i normally think of the pipeline when setting these values, for some reason it's easier for me. 10:16:01 PM brad: if it doesn't confuse you don't worry about it, i'm not always typical 10:16:24 PM boris: Would it be easier with two constants, TARGET_TO_MODEL and MODEL_TO_TARGET, and each method taking an int? 10:16:39 PM boris: It would cut down on the number of methods... brad10:17:03 PM brad: either that or having a naming convention that's a little more consistent (setTargetToModelUpdatePolicy(...), etc.) 10:17:31 PM brad: it might get a little verbose having to specify the direction for each method... 10:17:36 PM boris: T2M and M2T? 10:17:46 PM brad: yeah

Files changed in fix:
bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/databinding/beans/IBeanObservable.java bundles/org.eclipse.core.databinding.beans/src/org/eclipse/core/internal/databinding/internal/beans/BeanObservableValueDecorator.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/IObserving.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/masterdetail/DetailObservableList.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/masterdetail/DetailObservableSet.java bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/internal/databinding/observable/masterdetail/DetailObservableValue.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/BindSpec.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/DefaultBindSpec.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/IBindingListener.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/ListBinding.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/UpdateListStrategy.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/UpdateStrategy.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/UpdateValueStrategy.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/ValueBinding.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/databinding/observable/IObserving.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/ListBinding.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 bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/masterdetail/DetailObservableList.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/masterdetail/DetailObservableSet.java bundles/org.eclipse.core.databinding/src/org/eclipse/core/internal/databinding/observable/masterdetail/DetailObservableValue.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/nestedselection/TestMasterDetail.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet000HelloWorld.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet001NestedSelectionWithCombo.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet002UpdateComboRetainSelection.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet003UpdateComboBindUsingViewer.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet004DataBindingContextErrorLabel.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet008ComputedValue.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet010MasterDetail.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet011ValidateMultipleBindingsSnippet.java examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/snippets/Snippet0xffffffff.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/core/tests/databinding/beans/BeansObservablesTest.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/tests/databinding/BindSpecTests.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/BindingTestSuite.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/ButtonControlScenario.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/ComboScenarios.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/ComboUpdatingTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/ComboViewerScenario.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/CustomBeanUpdateValueStrategy.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/CustomConverterScenarios.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/CustomScenarios.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/LabelControlScenario.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/ListViewerScenario.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/MasterDetailScenarios.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/databinding/scenarios/NPETestScenario.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/SpinnerControlScenario.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/ListBindingTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/ListBindingTest_Pipeline.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/ListBindingTest_Policies.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/Pipeline.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/ValueBindingTest.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/ValueBindingTest_Pipeline.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/ValueBindingTest_Policies.java tests/org.eclipse.jface.tests.databinding/src/org/eclipse/jface/tests/internal/databinding/internal/beans/BeanObservableValueDecoratorTest.java tests/org.eclipse.ui.tests/Eclipse UI Tests/org/eclipse/ui/tests/manual/TestBackgroundSaveEditor.java