Yet another stumbling block encountered while implementing an Excel-like function using JFace & SWT:-(
I have an implementation of ICellModifier, called MyCellModifier (along with MyLabelProvider & MyContentProvider). That setup work all fine - it allows the user to click on a cell, start editing & then press enter to register the new value.
I also needed to implement the keyboard navigation within my table (which is a jface TableViewer). To this end, I have
final TableCursor cursor = new TableCursor(iTableViewer.getTable(), SWT.NONE); final ControlEditor editor = new ControlEditor(cursor);
This combination also works fine on its own. The trouble starts when I attempt to use both editing functionalities together. It seems that the TableCursor has some kind of precedence over ICellModifier. Adding TableCursor disables the ICellModifier & leaves the table only navigatble using the keyboard. A cell no longer becomes editable when you click on it!