| 1 | /* |
| 2 | *Copyright 2007, SDQ, IPD, University of Karlsruhe |
| 3 | */ |
| 4 | package de.uka.ipd.sdq.pcm.gmf.usage.edit.policies; |
| 5 | |
| 6 | import org.eclipse.gef.commands.Command; |
| 7 | import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest; |
| 8 | |
| 9 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.commands.BranchCreateCommand; |
| 10 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.commands.DelayCreateCommand; |
| 11 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.commands.EntryLevelSystemCallCreateCommand; |
| 12 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.commands.LoopCreateCommand; |
| 13 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.commands.StartCreateCommand; |
| 14 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.commands.StopCreateCommand; |
| 15 | import de.uka.ipd.sdq.pcm.gmf.usage.providers.PalladioComponentModelElementTypes; |
| 16 | |
| 17 | /** |
| 18 | * @generated |
| 19 | */ |
| 20 | public class ScenarioBehaviourScenarioBehaviourStepsCompartment3ItemSemanticEditPolicy |
| 21 | extends PalladioComponentModelBaseItemSemanticEditPolicy { |
| 22 | |
| 23 | /** |
| 24 | * @generated |
| 25 | */ |
| 26 | public ScenarioBehaviourScenarioBehaviourStepsCompartment3ItemSemanticEditPolicy() { |
| 27 | super(PalladioComponentModelElementTypes.ScenarioBehaviour_3010); |
| 28 | } |
| 29 | |
| 30 | /** |
| 31 | * @generated |
| 32 | */ |
| 33 | protected Command getCreateCommand(CreateElementRequest req) { |
| 34 | if (PalladioComponentModelElementTypes.Start_3001 == req |
| 35 | .getElementType()) { |
| 36 | return getGEFWrapper(new StartCreateCommand(req)); |
| 37 | } |
| 38 | if (PalladioComponentModelElementTypes.Stop_3002 == req |
| 39 | .getElementType()) { |
| 40 | return getGEFWrapper(new StopCreateCommand(req)); |
| 41 | } |
| 42 | if (PalladioComponentModelElementTypes.EntryLevelSystemCall_3003 == req |
| 43 | .getElementType()) { |
| 44 | return getGEFWrapper(new EntryLevelSystemCallCreateCommand(req)); |
| 45 | } |
| 46 | if (PalladioComponentModelElementTypes.Loop_3005 == req |
| 47 | .getElementType()) { |
| 48 | return getGEFWrapper(new LoopCreateCommand(req)); |
| 49 | } |
| 50 | if (PalladioComponentModelElementTypes.Branch_3008 == req |
| 51 | .getElementType()) { |
| 52 | return getGEFWrapper(new BranchCreateCommand(req)); |
| 53 | } |
| 54 | if (PalladioComponentModelElementTypes.Delay_3017 == req |
| 55 | .getElementType()) { |
| 56 | return getGEFWrapper(new DelayCreateCommand(req)); |
| 57 | } |
| 58 | return super.getCreateCommand(req); |
| 59 | } |
| 60 | } |