Search in sources :

Example 1 with EntityDeleteCommand

use of org.jkiss.dbeaver.ext.erd.command.EntityDeleteCommand in project dbeaver by serge-rider.

the class EntityEditPolicy method createDeleteCommand.

@Override
protected Command createDeleteCommand(GroupRequest request) {
    EntityPart entityPart = (EntityPart) getHost();
    Rectangle bounds = entityPart.getFigure().getBounds().getCopy();
    EntityDiagram parent = (EntityDiagram) (entityPart.getParent().getModel());
    return new EntityDeleteCommand(parent, entityPart, bounds);
}
Also used : EntityDiagram(org.jkiss.dbeaver.ext.erd.model.EntityDiagram) EntityDeleteCommand(org.jkiss.dbeaver.ext.erd.command.EntityDeleteCommand) Rectangle(org.eclipse.draw2d.geometry.Rectangle) EntityPart(org.jkiss.dbeaver.ext.erd.part.EntityPart)

Aggregations

Rectangle (org.eclipse.draw2d.geometry.Rectangle)1 EntityDeleteCommand (org.jkiss.dbeaver.ext.erd.command.EntityDeleteCommand)1 EntityDiagram (org.jkiss.dbeaver.ext.erd.model.EntityDiagram)1 EntityPart (org.jkiss.dbeaver.ext.erd.part.EntityPart)1