getGraphicalViewer().setEditPartFactory(createEditPartFactory());
getGraphicalViewer().setKeyHandler(
new GraphicalViewerKeyHandler(getGraphicalViewer())
.setParent(getCommonKeyHandler()));
IAction showGrid = new ToggleGridAction(getGraphicalViewer());
getActionRegistry().registerAction(showGrid);
ContextMenuProvider provider = new GenericContextMenuProvider(
getGraphicalViewer(), getActionRegistry());
getGraphicalViewer().setContextMenu(provider);