| 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.ClosedWorkloadCreateCommand; |
| 10 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.commands.OpenWorkloadCreateCommand; |
| 11 | import de.uka.ipd.sdq.pcm.gmf.usage.edit.commands.ScenarioBehaviourCreateCommand; |
| 12 | import de.uka.ipd.sdq.pcm.gmf.usage.providers.PalladioComponentModelElementTypes; |
| 13 | |
| 14 | /** |
| 15 | * @generated |
| 16 | */ |
| 17 | public class UsageScenarioUsageScenarioCompartmentItemSemanticEditPolicy extends |
| 18 | PalladioComponentModelBaseItemSemanticEditPolicy { |
| 19 | |
| 20 | /** |
| 21 | * @generated |
| 22 | */ |
| 23 | public UsageScenarioUsageScenarioCompartmentItemSemanticEditPolicy() { |
| 24 | super(PalladioComponentModelElementTypes.UsageScenario_2004); |
| 25 | } |
| 26 | |
| 27 | /** |
| 28 | * @generated |
| 29 | */ |
| 30 | protected Command getCreateCommand(CreateElementRequest req) { |
| 31 | if (PalladioComponentModelElementTypes.ScenarioBehaviour_3014 == req |
| 32 | .getElementType()) { |
| 33 | return getGEFWrapper(new ScenarioBehaviourCreateCommand(req)); |
| 34 | } |
| 35 | if (PalladioComponentModelElementTypes.ClosedWorkload_3015 == req |
| 36 | .getElementType()) { |
| 37 | return getGEFWrapper(new ClosedWorkloadCreateCommand(req)); |
| 38 | } |
| 39 | if (PalladioComponentModelElementTypes.OpenWorkload_3016 == req |
| 40 | .getElementType()) { |
| 41 | return getGEFWrapper(new OpenWorkloadCreateCommand(req)); |
| 42 | } |
| 43 | return super.getCreateCommand(req); |
| 44 | } |
| 45 | |
| 46 | } |