Search in sources :

Example 1 with NoteDeleteCommand

use of org.jkiss.dbeaver.erd.ui.command.NoteDeleteCommand in project dbeaver by dbeaver.

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.erd.ui.command.NoteDeleteCommand) EntityDiagram(org.jkiss.dbeaver.erd.ui.model.EntityDiagram) NotePart(org.jkiss.dbeaver.erd.ui.part.NotePart) Rectangle(org.eclipse.draw2d.geometry.Rectangle)

Example 2 with NoteDeleteCommand

use of org.jkiss.dbeaver.erd.ui.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.erd.ui.command.NoteDeleteCommand) EntityDiagram(org.jkiss.dbeaver.erd.ui.model.EntityDiagram) NotePart(org.jkiss.dbeaver.erd.ui.part.NotePart) Rectangle(org.eclipse.draw2d.geometry.Rectangle)

Aggregations

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