[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.tools.gef] Undo with keyboard
|
- From: Arnaud <arnaud@xxxxxxxxxxx>
- Date: Thu, 18 Nov 2004 15:41:19 +0100
- Newsgroups: eclipse.tools.gef
- Organization: EclipseCorner
- User-agent: Mozilla Thunderbird 0.7.3 (Windows/20040803)
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