Search in sources :

Example 1 with CompositeCommand

use of org.eclipse.gmf.runtime.common.core.command.CompositeCommand in project tdi-studio-se by Talend.

the class BusinessBaseEditHelper method getInsteadCommand.

/**
     * @generated
     */
protected ICommand getInsteadCommand(IEditCommandRequest req) {
    ICommand epCommand = (ICommand) req.getParameter(EDIT_POLICY_COMMAND);
    req.setParameter(EDIT_POLICY_COMMAND, null);
    ICommand ehCommand = super.getInsteadCommand(req);
    if (epCommand == null) {
        return ehCommand;
    }
    if (ehCommand == null) {
        return epCommand;
    }
    CompositeCommand command = new CompositeCommand(null);
    command.add(epCommand);
    command.add(ehCommand);
    return command;
}
Also used : ICommand(org.eclipse.gmf.runtime.common.core.command.ICommand) CompositeCommand(org.eclipse.gmf.runtime.common.core.command.CompositeCommand)

Example 2 with CompositeCommand

use of org.eclipse.gmf.runtime.common.core.command.CompositeCommand in project tdi-studio-se by Talend.

the class BusinessGraphicalNodeEditPolicy method getConnectionWithReorientedViewCompleteCommand.

/**
     * @generated
     */
protected Command getConnectionWithReorientedViewCompleteCommand(CreateConnectionRequest request) {
    ICommandProxy c = (ICommandProxy) super.getConnectionCompleteCommand(request);
    CompositeCommand cc = (CompositeCommand) c.getICommand();
    TransactionalEditingDomain editingDomain = ((IGraphicalEditPart) getHost()).getEditingDomain();
    BusinessReorientConnectionViewCommand rcvCommand = new BusinessReorientConnectionViewCommand(editingDomain, null);
    rcvCommand.setEdgeAdaptor(getViewAdapter());
    cc.compose(rcvCommand);
    return c;
}
Also used : IGraphicalEditPart(org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart) ICommandProxy(org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy) TransactionalEditingDomain(org.eclipse.emf.transaction.TransactionalEditingDomain) BusinessReorientConnectionViewCommand(org.talend.designer.business.model.business.diagram.edit.commands.BusinessReorientConnectionViewCommand) CompositeCommand(org.eclipse.gmf.runtime.common.core.command.CompositeCommand)

Aggregations

CompositeCommand (org.eclipse.gmf.runtime.common.core.command.CompositeCommand)2 TransactionalEditingDomain (org.eclipse.emf.transaction.TransactionalEditingDomain)1 ICommand (org.eclipse.gmf.runtime.common.core.command.ICommand)1 ICommandProxy (org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy)1 IGraphicalEditPart (org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart)1 BusinessReorientConnectionViewCommand (org.talend.designer.business.model.business.diagram.edit.commands.BusinessReorientConnectionViewCommand)1