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