Search in sources :

Example 1 with DeleteConnectionCommand

use of com.cubrid.cubridmanager.ui.replication.editor.commands.DeleteConnectionCommand in project cubrid-manager by CUBRID.

the class ConnectionEditPolicy method createDeleteCommand.

/**
	 * @see org.eclipse.gef.editpolicies.ComponentEditPolicy#createDeleteCommand(org.eclipse.gef.requests.GroupRequest)
	 * @param deleteRequest the DeleteRequest
	 * @return Command <code>null</code> or a contribution to the delete
	 */
protected Command createDeleteCommand(GroupRequest deleteRequest) {
    ArrowConnection conn = (ArrowConnection) getHost().getModel();
    DeleteConnectionCommand cmd = new DeleteConnectionCommand();
    cmd.setConnection(conn);
    cmd.setSource(conn.getSource());
    cmd.setTarget(conn.getTarget());
    return cmd;
}
Also used : ArrowConnection(com.cubrid.cubridmanager.ui.replication.editor.model.ArrowConnection) DeleteConnectionCommand(com.cubrid.cubridmanager.ui.replication.editor.commands.DeleteConnectionCommand)

Aggregations

DeleteConnectionCommand (com.cubrid.cubridmanager.ui.replication.editor.commands.DeleteConnectionCommand)1 ArrowConnection (com.cubrid.cubridmanager.ui.replication.editor.model.ArrowConnection)1