comparison org.eclipse.jface.databinding/src/org/eclipse/jface/databinding/viewers/ObservableValueEditingSupport.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
37 * Maintains references to the instances currently imployed while editing. 37 * Maintains references to the instances currently imployed while editing.
38 * Will be <code>null</code> when not editing. 38 * Will be <code>null</code> when not editing.
39 */ 39 */
40 private EditingState editingState; 40 private EditingState editingState;
41 41
42 private final ColumnViewerEditorActivationListenerHelper activationListener = new ColumnViewerEditorActivationListenerHelper(); 42 private const ColumnViewerEditorActivationListenerHelper activationListener;
43 43
44 private ColumnViewer viewer; 44 private ColumnViewer viewer;
45 45
46 private DataBindingContext dbc; 46 private DataBindingContext dbc;
47 47
54 * @param dbc 54 * @param dbc
55 * dbc to create <code>Bindings</code> 55 * dbc to create <code>Bindings</code>
56 */ 56 */
57 public this(ColumnViewer viewer, 57 public this(ColumnViewer viewer,
58 DataBindingContext dbc) { 58 DataBindingContext dbc) {
59 activationListener = new ColumnViewerEditorActivationListenerHelper();
59 super(viewer); 60 super(viewer);
60 61
61 if (dbc is null) { 62 if (dbc is null) {
62 throw new IllegalArgumentException("Parameter dbc was null."); //$NON-NLS-1$ 63 throw new IllegalArgumentException("Parameter dbc was null."); //$NON-NLS-1$
63 } 64 }
105 */ 106 */
106 final protected void initializeCellEditorValue(CellEditor cellEditor, 107 final protected void initializeCellEditorValue(CellEditor cellEditor,
107 ViewerCell cell) { 108 ViewerCell cell) {
108 IObservableValue target = doCreateCellEditorObservable(cellEditor); 109 IObservableValue target = doCreateCellEditorObservable(cellEditor);
109 Assert 110 Assert
110 .isNotNull(target, 111 .isNotNull(cast(Object)target,
111 "doCreateCellEditorObservable(...) did not return an observable"); //$NON-NLS-1$ 112 "doCreateCellEditorObservable(...) did not return an observable"); //$NON-NLS-1$
112 113
113 IObservableValue model = doCreateElementObservable(cell.getElement(), 114 IObservableValue model = doCreateElementObservable(cell.getElement(),
114 cell); 115 cell);
115 Assert.isNotNull(model, 116 Assert.isNotNull(cast(Object)model,
116 "doCreateElementObservable(...) did not return an observable"); //$NON-NLS-1$ 117 "doCreateElementObservable(...) did not return an observable"); //$NON-NLS-1$
117 118
118 Binding binding = createBinding(target, model); 119 Binding binding = createBinding(target, model);
119 Assert 120 Assert
120 .isNotNull(binding, 121 .isNotNull(binding,