Search in sources :

Example 16 with NodePart

use of org.jkiss.dbeaver.erd.ui.part.NodePart in project dbeaver by serge-rider.

the class EntityConnectionEditPolicy method getReconnectSourceCommand.

@Override
protected Command getReconnectSourceCommand(ReconnectRequest request) {
    AssociationReconnectSourceCommand cmd = makeReconnectSourceCommand();
    cmd.setAssociation((ERDAssociation) request.getConnectionEditPart().getModel());
    NodePart entityPart = (NodePart) getHost();
    cmd.setSourceEntity(entityPart.getElement());
    return cmd;
}
Also used : AssociationReconnectSourceCommand(org.jkiss.dbeaver.erd.ui.command.AssociationReconnectSourceCommand) NodePart(org.jkiss.dbeaver.erd.ui.part.NodePart)

Aggregations

NodePart (org.jkiss.dbeaver.erd.ui.part.NodePart)16 EntityPart (org.jkiss.dbeaver.erd.ui.part.EntityPart)6 IFigure (org.eclipse.draw2d.IFigure)4 Command (org.eclipse.gef.commands.Command)4 AssociationCreateCommand (org.jkiss.dbeaver.erd.ui.command.AssociationCreateCommand)4 NotePart (org.jkiss.dbeaver.erd.ui.part.NotePart)4 HashMap (java.util.HashMap)2 List (java.util.List)2 Map (java.util.Map)2 Figure (org.eclipse.draw2d.Figure)2 Rectangle (org.eclipse.draw2d.geometry.Rectangle)2 AssociationReconnectSourceCommand (org.jkiss.dbeaver.erd.ui.command.AssociationReconnectSourceCommand)2 AssociationReconnectTargetCommand (org.jkiss.dbeaver.erd.ui.command.AssociationReconnectTargetCommand)2 NodeMoveCommand (org.jkiss.dbeaver.erd.ui.command.NodeMoveCommand)2 EntityDiagram (org.jkiss.dbeaver.erd.ui.model.EntityDiagram)2 ICustomizablePart (org.jkiss.dbeaver.erd.ui.part.ICustomizablePart)2