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.RequiredDelegationConnector; |
12 | import de.uka.ipd.sdq.pcm.core.entity.EntityPackage; |
13 | |
14 | /** |
15 | * @generated not |
16 | */ |
17 | public class RequiredDelegationConnectorEditHelper extends |
18 | PalladioComponentModelBaseEditHelper { |
19 | |
20 | @Override |
21 | protected ICommand getConfigureCommand(ConfigureRequest req) { |
22 | RequiredDelegationConnector con = (RequiredDelegationConnector) req |
23 | .getElementToConfigure(); |
24 | String name = "ReqDelegation "; |
25 | name += con.getInnerRequiredRole_RequiredDelegationConnector() == null ? "" |
26 | : con.getInnerRequiredRole_RequiredDelegationConnector() |
27 | .getEntityName(); |
28 | name += " -> "; |
29 | name += con.getOuterRequiredRole_RequiredDelegationConnector() == null ? "" |
30 | : con.getOuterRequiredRole_RequiredDelegationConnector() |
31 | .getEntityName(); |
32 | |
33 | ICommand cmd2 = new SetValueCommand(new SetRequest(req |
34 | .getElementToConfigure(), EntityPackage.eINSTANCE |
35 | .getNamedElement_EntityName(), name)); |
36 | return cmd2; |
37 | } |
38 | } |