Bug 172193 [DataBinding] Binding customization story
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
examples/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/nestedselection/TestMasterDetail.java
GridData gridData4 = new org.eclipse.swt.layout.GridData();
		gridData4.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;
		gridData4.verticalAlignment = org.eclipse.swt.layout.GridData.CENTER;
		GridData gridData3 = new org.eclipse.swt.layout.GridData();
		gridData3.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;
		gridData3.verticalAlignment = org.eclipse.swt.layout.GridData.CENTER;
		GridData gridData2 = new org.eclipse.swt.layout.GridData();
		gridData2.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;
		gridData2.verticalAlignment = org.eclipse.swt.layout.GridData.CENTER;
		GridData gridData1 = new org.eclipse.swt.layout.GridData();
		gridData1.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;
		gridData1.verticalAlignment = org.eclipse.swt.layout.GridData.CENTER;
		GridLayout gridLayout = new GridLayout();
		gridLayout.numColumns = 2;
		shell = new Shell();
		shell.setText("Shell");
		createTable();
		shell.setLayout(gridLayout);
		shell.setSize(new org.eclipse.swt.graphics.Point(495, 357));
		label1 = new Label(shell, SWT.NONE);
		label1.setText("Name");
		name = new Text(shell, SWT.BORDER);
		name.setLayoutData(gridData1);
		label2 = new Label(shell, SWT.NONE);
		label2.setText("Address");
		address = new Text(shell, SWT.BORDER);
		address.setLayoutData(gridData2);
		label3 = new Label(shell, SWT.NONE);
		label3.setText("City");
		city = new Text(shell, SWT.BORDER);