@Override
  protected void createActions() {
    super.createActions();
    ActionRegistry registry = getActionRegistry();

    IAction action = new MatchWidthAction(this);
    registry.registerAction(action);
    getSelectionActions().add(action.getId());

    action = new MatchHeightAction(this);
    registry.registerAction(action);
    getSelectionActions().add(action.getId());

    action = new AlignmentAction((IWorkbenchPart) this, PositionConstants.LEFT);
    registry.registerAction(action);
    getSelectionActions().add(action.getId());

    action = new AlignmentAction((IWorkbenchPart) this, PositionConstants.RIGHT);
    registry.registerAction(action);
    getSelectionActions().add(action.getId());

    action = new AlignmentAction((IWorkbenchPart) this, PositionConstants.TOP);
    registry.registerAction(action);
    getSelectionActions().add(action.getId());

    action = new AlignmentAction((IWorkbenchPart) this, PositionConstants.BOTTOM);
    registry.registerAction(action);
    getSelectionActions().add(action.getId());

    action = new AlignmentAction((IWorkbenchPart) this, PositionConstants.CENTER);
    registry.registerAction(action);
    getSelectionActions().add(action.getId());

    action = new AlignmentAction((IWorkbenchPart) this, PositionConstants.MIDDLE);
    registry.registerAction(action);
    getSelectionActions().add(action.getId());
  }
  @Override
  protected void configureGraphicalViewer() {
    super.configureGraphicalViewer();

    GraphicalViewer viewer = getGraphicalViewer();
    viewer.setEditPartFactory(new TadpoleEditPartFactory());

    // zoom menu
    zoomContribution(viewer);

    // layout action
    createDiagramAction(viewer);

    // context menu
    ContextMenuProvider provider = new TadpoleERDContextMenuProvider(viewer, getActionRegistry());
    viewer.setContextMenu(provider);

    // key handler
    configureKeyHandler();

    // grid and geometry
    configureGeometry();
    configureGrid();
  }
 @Override
 public void commandStackChanged(EventObject event) {
   firePropertyChange(PROP_DIRTY);
   super.commandStackChanged(event);
 }
 @Override
 public void init(IEditorSite site, IEditorInput input) throws PartInitException {
   super.init(site, input);
   loadDBRsource(input);
 }
 @Override
 public void dispose() {
   super.dispose();
 }