public void onCreate() {
final WorkbookCtrl bookCtrl = getDesktopWorkbenchContext().getWorkbookCtrl();
bookCtrl.addEventListener(Events.ON_CELL_FOUCSED, new EventListener() {
@Override
public void onEvent(Event event) throws Exception {
CellEvent cellEvent = (CellEvent)event;
everFocusCell = true;
if (!isComposingFormula(newEdit)) {
Cell cell = Utils.getCell(cellEvent.getSheet(), cellEvent.getRow(), cellEvent.getColumn());
String editText = Utils.getEditText(cell);
setText(cell == null ? "" : (editText == null ? "" : editText));
} else {
if (!editExistingFormula) {
FormulaEditor.this.focus();
String lastFocusRef = focusCellRef;
focusCellRef = bookCtrl.getReference(cellEvent.getRow(), cellEvent.getColumn());
if (replaceFormulaReference(lastFocusRef, focusCellRef))
return;
else
appendFormulaReference(focusCellRef);
generateCellFocus(newEdit);