1 | /* |
2 | *Copyright 2007, SDQ, IPD, Uni Karlsruhe (TH) |
3 | */ |
4 | package de.uka.ipd.sdq.pcm.gmf.composite.edit.helpers; |
5 | |
6 | import org.eclipse.gmf.runtime.common.core.command.ICommand; |
7 | import org.eclipse.gmf.runtime.emf.type.core.commands.SetValueCommand; |
8 | import org.eclipse.gmf.runtime.emf.type.core.requests.ConfigureRequest; |
9 | import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest; |
10 | |
11 | import de.uka.ipd.sdq.pcm.core.composition.ProvidedDelegationConnector; |
12 | import de.uka.ipd.sdq.pcm.core.entity.EntityPackage; |
13 | |
14 | /** |
15 | * @generated not |
16 | */ |
17 | public class ProvidedDelegationConnectorEditHelper extends |
18 | PalladioComponentModelBaseEditHelper { |
19 | |
20 | @Override |
21 | protected ICommand getConfigureCommand(ConfigureRequest req) { |
22 | ProvidedDelegationConnector con = (ProvidedDelegationConnector) req |
23 | .getElementToConfigure(); |
24 | String name = "ProvDelegation "; |
25 | name += con.getOuterProvidedRole_ProvidedDelegationConnector() == null ? "" |
26 | : con.getOuterProvidedRole_ProvidedDelegationConnector() |
27 | .getEntityName(); |
28 | name += " -> "; |
29 | name += con.getInnerProvidedRole_ProvidedDelegationConnector() == null ? "" |
30 | : con.getInnerProvidedRole_ProvidedDelegationConnector() |
31 | .getEntityName(); |
32 | |
33 | ICommand cmd2 = new SetValueCommand(new SetRequest(req |
34 | .getElementToConfigure(), EntityPackage.eINSTANCE |
35 | .getNamedElement_EntityName(), name)); |
36 | return cmd2; |
37 | } |
38 | } |