Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[gef-dev] delete action

Hi,
is somebody knows how to delete an editpart in a graphicalViewer?
I have write:

viewer.setKeyHandler(new GraphicalViewerKeyHandler(viewer)
    .setParent(getCommonKeyHandler()));

protected KeyHandler getCommonKeyHandler() {
  if (sharedKeyHandler == null) {
   sharedKeyHandler = new KeyHandler();
   sharedKeyHandler.put(
    KeyStroke.getPressed(SWT.DEL, 127, 0),
    getActionRegistry().getAction(GEFActionConstants.DELETE));
  }
  return sharedKeyHandler;
 }

but it doesn't work!
thanks




Back to the top