1 | /** |
2 | * |
3 | */ |
4 | package de.uka.ipd.sdq.pcm.gmf.seff.helper; |
5 | |
6 | import org.eclipse.gmf.runtime.common.core.command.ICommand; |
7 | import org.eclipse.gmf.runtime.emf.type.core.IElementType; |
8 | import org.eclipse.gmf.runtime.emf.type.core.commands.CreateElementCommand; |
9 | import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice; |
10 | import org.eclipse.gmf.runtime.emf.type.core.edithelper.IEditHelperAdvice; |
11 | import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest; |
12 | import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest; |
13 | |
14 | import de.uka.ipd.sdq.pcm.gmf.seff.providers.PalladioComponentModelElementTypes; |
15 | |
16 | /** |
17 | * @author admin |
18 | * |
19 | */ |
20 | public class IncludeResourceDemandingBehaviourEditHelperAdvice extends |
21 | AbstractEditHelperAdvice implements IEditHelperAdvice { |
22 | |
23 | /* (non-Javadoc) |
24 | * @see org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice#getAfterConfigureCommand(org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest) |
25 | */ |
26 | @Override |
27 | protected ICommand getAfterConfigureCommand(ConfigureRequest request) { |
28 | |
29 | IElementType elementType = PalladioComponentModelElementTypes.ResourceDemandingBehaviour_3014; |
30 | |
31 | CreateElementRequest createElementRequest = new CreateElementRequest( |
32 | request.getElementToConfigure(), elementType); |
33 | return new CreateElementCommand(createElementRequest); |
34 | } |
35 | |
36 | } |