comparison org.eclipse.jface.databinding/src/org/eclipse/jface/internal/databinding/swt/ShellObservableValue.d @ 85:6be48cf9f95c

Work on databinding
author Frank Benoit <benoit@tionex.de>
date Sat, 18 Apr 2009 13:54:50 +0200
parents 0a55d2d5a946
children
comparison
equal deleted inserted replaced
84:fcf926c91ca4 85:6be48cf9f95c
59 protected void doSetValue(Object value) { 59 protected void doSetValue(Object value) {
60 String oldValue = shell.getText(); 60 String oldValue = shell.getText();
61 String newValue = value is null ? "" : value.toString(); //$NON-NLS-1$ 61 String newValue = value is null ? "" : value.toString(); //$NON-NLS-1$
62 shell.setText(newValue); 62 shell.setText(newValue);
63 63
64 if (!newValue.opEquals(oldValue)) { 64 if (!newValue.equals(oldValue)) {
65 fireValueChange(Diffs.createValueDiff(oldValue, newValue)); 65 fireValueChange(Diffs.createValueDiff(stringcast(oldValue), stringcast(newValue)));
66 } 66 }
67 } 67 }
68 68
69 protected Object doGetValue() { 69 protected Object doGetValue() {
70 return shell.getText(); 70 return stringcast(shell.getText());
71 } 71 }
72 72
73 public Object getValueType() { 73 public Object getValueType() {
74 return String.classinfo; 74 return Class.fromType!(String);
75 } 75 }
76 } 76 }