[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools.gef] Undo with keyboard

I cannot undo in my gef editor with keyboard but I can delete

I create a keyHandler :

keyHandler = new KeyHandler();

keyHandler.put(KeyStroke.getPressed(SWT.DEL, 127, 0),
	getActionRegistry().getAction(ActionFactory.DELETE.getId()));

keyHandler.put(KeyStroke.getPressed(26, SWT.CTRL),
  	getActionRegistry().getAction(ActionFactory.UNDO.getId()));

keyHandler.put(KeyStroke.getPressed(25, SWT.CTRL),
	getActionRegistry().getAction(ActionFactory.REDO.getId()));


and I reference it in my configureGraphicalViewer method :

GraphicalViewerKeyHandler keyHandler=new GraphicalViewerKeyHandler(getGraphicalViewer());
keyHandler.setParent(getCommonKeyHandler(getGraphicalViewer()));
getGraphicalViewer().setKeyHandler(this.keyHandler);


It works fine with the delet command but doesn t seem to run with the undo/redo

thx