| /** |
| * |
| */ |
| package org.eclipse.epf.diagramming.base.commands; |
| |
| import org.eclipse.gef.commands.Command; |
| import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest; |
| import org.eclipse.uml2.uml.ActivityNode; |
| import org.eclipse.uml2.uml.DecisionNode; |
| import org.eclipse.uml2.uml.ForkNode; |
| import org.eclipse.uml2.uml.JoinNode; |
| import org.eclipse.uml2.uml.MergeNode; |
| import org.eclipse.uml2.uml.NamedElement; |
| |
| /** |
| * Command updates the predecessor information of UMA model based on diagram |
| * links creation between {@link ActivityNode}s. |
| * Usecase is to update the predecessor information. Links established in diagram |
| * between any two {@link ActivityNode}s updates the predecessor informatino, in case either source or target is {@link DecisionNode} or |
| * {@link MergeNode} predecessor information should not be update. |
| * {@link ForkNode} or {@link JoinNode} need to find incoming and outgoing update |
| * all the predecessors information. |
| * |
| * @author Shashidhar Kannoori |
| * |
| */ |
| public class CreatePredecessorCommand extends Command { |
| |
| |
| private NamedElement target; |
| private NamedElement source; |
| private CreateRelationshipRequest req; |
| |
| public CreatePredecessorCommand(CreateRelationshipRequest req) { |
| this.req = req; |
| } |
| /** |
| * |
| */ |
| public CreatePredecessorCommand(NamedElement source, NamedElement target) { |
| this.source = source; |
| this.target = target; |
| } |
| |
| /** |
| * @param label |
| */ |
| public CreatePredecessorCommand(String label) { |
| super(label); |
| // TODO Auto-generated constructor stub |
| } |
| |
| |
| } |