Package org.springframework.ide.eclipse.webflow.ui.graph.commands

Examples of org.springframework.ide.eclipse.webflow.ui.graph.commands.StateTransitionCreateCommand


     */
    protected Command getConnectionCompleteCommand(
            CreateConnectionRequest request) {
        if (request.getNewObject() instanceof IStateTransition) {
            if (getHost().getModel() instanceof ITransitionableTo) {
                StateTransitionCreateCommand cmd = (StateTransitionCreateCommand) request
                        .getStartCommand();
                IState source = cmd.getSource();
                ITransitionableTo target = (ITransitionableTo) getState();
                if (!(target instanceof IInlineFlowState) && source.getElementParent().equals(target.getElementParent())) {
                  cmd.setTarget((ITransitionableTo) getState());
                  return cmd;
                }
                else {
                  return null;
                }
            }
        }
        else if (request.getNewObject() instanceof IIfTransition) {
            if (getHost().getModel() instanceof ITransitionableTo) {
                IfTransitionCreateCommand cmd = (IfTransitionCreateCommand) request
                        .getStartCommand();
                cmd.setTarget((ITransitionableTo) getState());
                return cmd;
            }
        }
        return null;
    }
View Full Code Here


                    || getHost().getModel() instanceof IAttributeMapper
                    || getHost().getModel() instanceof IDecisionState
                    || getHost().getModel() instanceof IIf
                || getHost().getModel() instanceof IInlineFlowState)
                return null;
            StateTransitionCreateCommand cmd = new StateTransitionCreateCommand();
            cmd.setSource((ITransitionableFrom) getHost().getModel());
            request.setStartCommand(cmd);
            return cmd;
        }
        else if (request.getNewObject() instanceof IIfTransition) {
            if (!(getHost().getModel() instanceof IIf))
                return null;
            if (((IIf) getHost().getModel()).getElseTransition() != null)
                return null;
            IfTransitionCreateCommand cmd = new IfTransitionCreateCommand();
            cmd.setSource((IIf) getHost().getModel());
            request.setStartCommand(cmd);
            return cmd;
        }
        return null;
    }
View Full Code Here

TOP

Related Classes of org.springframework.ide.eclipse.webflow.ui.graph.commands.StateTransitionCreateCommand

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.