1 | package de.uka.ipd.sdq.pcm.gmf.resource.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 AbstractCreateCommunicationLinkResourceSpecificationEditHelperAdvice 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.resource.CommunicationLinkResourceSpecification_3002"); |
21 | |
22 | CreateElementRequest createElementRequest = new CreateElementRequest( |
23 | request.getElementToConfigure(), elementType); |
24 | return new CreateElementCommand(createElementRequest); |
25 | } |
26 | |
27 | } |