Search in sources :

Example 1 with NoteDeleteCommand

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

the class NoteEditPolicy method createDeleteCommand.

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

Aggregations

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