@@ -0,0 +1,2835 @@
+package org.corpus_tools.atomic.grideditor.configuration;%0A%0Aimport org.corpus_tools.atomic.grideditor.GridEditor;%0Aimport org.eclipse.nebula.widgets.nattable.edit.action.CellEditDragMode;%0Aimport org.eclipse.nebula.widgets.nattable.edit.action.KeyEditAction;%0Aimport org.eclipse.nebula.widgets.nattable.edit.action.MouseEditAction;%0Aimport org.eclipse.nebula.widgets.nattable.edit.config.DefaultEditBindings;%0Aimport org.eclipse.nebula.widgets.nattable.grid.GridRegion;%0Aimport org.eclipse.nebula.widgets.nattable.painter.cell.CheckBoxPainter;%0Aimport org.eclipse.nebula.widgets.nattable.ui.binding.UiBindingRegistry;%0Aimport org.eclipse.nebula.widgets.nattable.ui.matcher.CellEditorMouseEventMatcher;%0Aimport org.eclipse.nebula.widgets.nattable.ui.matcher.CellPainterMouseEventMatcher;%0Aimport org.eclipse.nebula.widgets.nattable.ui.matcher.KeyEventMatcher;%0Aimport org.eclipse.nebula.widgets.nattable.ui.matcher.LetterOrDigitKeyEventMatcher;%0Aimport org.eclipse.nebula.widgets.nattable.ui.matcher.MouseEventMatcher;%0Aimport org.eclipse.swt.SWT;%0A%0A/**%0A * Custom edit bindings for %7B@link GridEditor%7D.%0A * %0A * @author Stephan Druskat %3C%5Bmail@sdruskat.net%5D(mailto:mail@sdruskat.net)%3E%0A * %0A */%0Apublic class GridEditorEditBindings extends DefaultEditBindings %7B%0A%0A%09/**%0A%09 *  Customized edit bindings. The difference between%0A%09 *  this implementation and %7B@link DefaultEditBindings%7D%0A%09 *  is that %7B@link UiBindingRegistry#registerSingleClickBinding(org.eclipse.nebula.widgets.nattable.ui.matcher.IMouseEventMatcher, org.eclipse.nebula.widgets.nattable.ui.action.IMouseAction)%7D%0A%09 *  is not called.%0A%09 *  %0A%09 *  This is to prevent the activation of the cell editor%0A%09 *  whenever a cell is clicked for the first time.%0A%09 *  %0A%09 *  For the activation of the cell editor via%0A%09 *  %7B@link MouseEditAction%7D, a double-click binding%0A%09 *  is registered instead. Also, editing is activated%0A%09 *  as soon as any %22content%22 key is pressed in a cell,%0A%09 *  via key bindings.%0A%09 */%0A%09@Override%0A%09public void configureUiBindings(UiBindingRegistry uiBindingRegistry) %7B%0A%09%09uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.NONE, 32), new KeyEditAction());%0A%09%09uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.NONE, SWT.F2), new KeyEditAction());%0A%09%09uiBindingRegistry.registerKeyBinding(new LetterOrDigitKeyEventMatcher(), new KeyEditAction());%0A%09%09uiBindingRegistry.registerKeyBinding(new LetterOrDigitKeyEventMatcher(SWT.MOD2), new KeyEditAction());%0A%0A%09%09uiBindingRegistry.registerDoubleClickBinding(new CellEditorMouseEventMatcher(GridRegion.BODY), new MouseEditAction());%0A%0A%09%09uiBindingRegistry.registerMouseDragMode(new CellEditorMouseEventMatcher(GridRegion.BODY), new CellEditDragMode());%0A%0A%09%09uiBindingRegistry.registerFirstMouseDragMode(new CellPainterMouseEventMatcher(GridRegion.BODY, MouseEventMatcher.LEFT_BUTTON, CheckBoxPainter.class), new CellEditDragMode());%0A%09%7D%0A%0A%7D%0A

Add custom edit bindings