1 | /* |
2 | *Copyright 2007, SDQ, IPD, U KA |
3 | */ |
4 | package de.uka.ipd.sdq.pcm.gmf.allocation.edit.helpers; |
5 | |
6 | import org.eclipse.gmf.runtime.common.core.command.CompositeCommand; |
7 | import org.eclipse.gmf.runtime.common.core.command.ICommand; |
8 | import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelper; |
9 | import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest; |
10 | import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest; |
11 | import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest; |
12 | import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyReferenceRequest; |
13 | import org.eclipse.gmf.runtime.emf.type.core.requests.IEditCommandRequest; |
14 | |
15 | /** |
16 | * @generated |
17 | */ |
18 | public class PalladioComponentModelBaseEditHelper extends AbstractEditHelper { |
19 | |
20 | /** |
21 | * @generated |
22 | */ |
23 | public static final String EDIT_POLICY_COMMAND = "edit policy command"; //$NON-NLS-1$ |
24 | |
25 | /** |
26 | * @generated |
27 | */ |
28 | protected ICommand getInsteadCommand(IEditCommandRequest req) { |
29 | ICommand epCommand = (ICommand) req.getParameter(EDIT_POLICY_COMMAND); |
30 | req.setParameter(EDIT_POLICY_COMMAND, null); |
31 | ICommand ehCommand = super.getInsteadCommand(req); |
32 | if (epCommand == null) { |
33 | return ehCommand; |
34 | } |
35 | if (ehCommand == null) { |
36 | return epCommand; |
37 | } |
38 | CompositeCommand command = new CompositeCommand(null); |
39 | command.add(epCommand); |
40 | command.add(ehCommand); |
41 | return command; |
42 | } |
43 | |
44 | /** |
45 | * @generated |
46 | */ |
47 | protected ICommand getCreateCommand(CreateElementRequest req) { |
48 | return null; |
49 | } |
50 | |
51 | /** |
52 | * @generated |
53 | */ |
54 | protected ICommand getCreateRelationshipCommand( |
55 | CreateRelationshipRequest req) { |
56 | return null; |
57 | } |
58 | |
59 | /** |
60 | * @generated |
61 | */ |
62 | protected ICommand getDestroyElementCommand(DestroyElementRequest req) { |
63 | return null; |
64 | } |
65 | |
66 | /** |
67 | * @generated |
68 | */ |
69 | protected ICommand getDestroyReferenceCommand(DestroyReferenceRequest req) { |
70 | return null; |
71 | } |
72 | } |