01: package newprocess.diagram.edit.commands;
02:
03: import newprocess.NewprocessPackage;
04:
05: import org.eclipse.emf.ecore.EClass;
06: import org.eclipse.emf.ecore.EObject;
07:
08: import org.eclipse.gmf.runtime.emf.type.core.commands.CreateElementCommand;
09:
10: import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
11:
12: import org.eclipse.gmf.runtime.notation.View;
13:
14: /**
15: * @generated
16: */
17: public class EventCreateCommand extends CreateElementCommand {
18:
19: /**
20: * @generated
21: */
22: public EventCreateCommand(CreateElementRequest req) {
23: super (req);
24: }
25:
26: /**
27: * @generated
28: */
29: protected EClass getEClassToEdit() {
30: return NewprocessPackage.eINSTANCE.getProcess();
31: };
32:
33: /**
34: * @generated
35: */
36: protected EObject getElementToEdit() {
37: EObject container = ((CreateElementRequest) getRequest())
38: .getContainer();
39: if (container instanceof View) {
40: container = ((View) container).getElement();
41: }
42: return container;
43: }
44:
45: }
|