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