Search in sources :

Example 1 with RelationReconnectionCommand

use of org.talend.sqlbuilder.erdiagram.ui.commands.RelationReconnectionCommand in project tdi-studio-se by Talend.

the class ColumnGraphicalEditPolicy method getReconnectTargetCommand.

@Override
protected Command getReconnectTargetCommand(ReconnectRequest request) {
    Relation relation = (Relation) request.getConnectionEditPart().getModel();
    Column newTarget = (Column) getHost().getModel();
    RelationReconnectionCommand command = new RelationReconnectionCommand(relation);
    command.setNewTarget(newTarget);
    return command;
}
Also used : Relation(org.talend.sqlbuilder.erdiagram.ui.nodes.Relation) Column(org.talend.sqlbuilder.erdiagram.ui.nodes.Column) RelationReconnectionCommand(org.talend.sqlbuilder.erdiagram.ui.commands.RelationReconnectionCommand)

Example 2 with RelationReconnectionCommand

use of org.talend.sqlbuilder.erdiagram.ui.commands.RelationReconnectionCommand in project tdi-studio-se by Talend.

the class ColumnGraphicalEditPolicy method getReconnectSourceCommand.

@Override
protected Command getReconnectSourceCommand(ReconnectRequest request) {
    Relation relation = (Relation) request.getConnectionEditPart().getModel();
    Column newSource = (Column) getHost().getModel();
    RelationReconnectionCommand command = new RelationReconnectionCommand(relation);
    command.setNewSource(newSource);
    return command;
}
Also used : Relation(org.talend.sqlbuilder.erdiagram.ui.nodes.Relation) Column(org.talend.sqlbuilder.erdiagram.ui.nodes.Column) RelationReconnectionCommand(org.talend.sqlbuilder.erdiagram.ui.commands.RelationReconnectionCommand)

Aggregations

RelationReconnectionCommand (org.talend.sqlbuilder.erdiagram.ui.commands.RelationReconnectionCommand)2 Column (org.talend.sqlbuilder.erdiagram.ui.nodes.Column)2 Relation (org.talend.sqlbuilder.erdiagram.ui.nodes.Relation)2