// From Nebula EditController (with minor tweaks)
  protected ExecutionStatusKind editCell(
      ILayerCell cell,
      Composite parent,
      Object initialCanonicalValue,
      IConfigRegistry configRegistry) {
    ExecutionStatusKind result = ExecutionStatusKind.FAIL_ROLLBACK;

    try {
      Rectangle cellBounds = cell.getBounds();
      ILayer layer = cell.getLayer();

      int columnPosition = cell.getColumnPosition();
      int rowPosition = cell.getRowPosition();

      List<String> configLabels = cell.getConfigLabels().getLabels();

      ICellEditor cellEditor =
          (ICellEditor)
              configRegistry.getConfigAttribute(
                  EditConfigAttributes.CELL_EDITOR, DisplayMode.EDIT, configLabels);

      // Try to open an in-line editor before falling back to a dialog
      if (cellEditor.openInline(configRegistry, configLabels)) {
        MyInlineEditHandler editHandler =
            new MyInlineEditHandler(layer, columnPosition, rowPosition);

        Rectangle editorBounds =
            layer
                .getLayerPainter()
                .adjustCellBounds(
                    columnPosition,
                    rowPosition,
                    new Rectangle(cellBounds.x, cellBounds.y, cellBounds.width, cellBounds.height));

        cellEditor.activateCell(
            parent, initialCanonicalValue, EditModeEnum.INLINE, editHandler, cell, configRegistry);

        Control editorControl = cellEditor.getEditorControl();
        if ((editorControl != null) && (!(editorControl.isDisposed()))) {
          editorControl.setBounds(editorBounds);

          cellEditor.addEditorControlListeners();
          ActiveCellEditorRegistry.registerActiveCellEditor(cellEditor);
        }

        // Command succeeded but should not appear on the undo stack because we haven't completed an
        // edit (only activated the cell editor),
        // unless the cell editor is like the CheckBoxCellEditor that commits upon activation
        result =
            editHandler.isCommitted()
                ? ExecutionStatusKind.OK_COMPLETE
                : ExecutionStatusKind.OK_ROLLBACK;
      } else {
        // The dialog case
        List<ILayerCell> cells = new ArrayList<ILayerCell>(1);
        cells.add(cell);
        result = editCells(cells, parent, initialCanonicalValue, configRegistry);
      }
    } catch (OperationCanceledException e) {
      // OK.  The user cancelled a dialog or some such
      result = ExecutionStatusKind.FAIL_ROLLBACK;
    } catch (Exception e) {
      Activator.log.error("Uncaught exception in table cell editor activation.", e); // $NON-NLS-1$
    }

    return result;
  }