01: package newprocess.diagram.edit.policies;
02:
03: import newprocess.NewprocessPackage;
04: import newprocess.diagram.edit.commands.LoaderCreateCommand;
05: import newprocess.diagram.providers.New_processElementTypes;
06:
07: import org.eclipse.gef.commands.Command;
08: import org.eclipse.gef.commands.UnexecutableCommand;
09: import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
10: import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
11:
12: /**
13: * @generated
14: */
15: public class GlobalsGlobalsLoaderCompartmentItemSemanticEditPolicy
16: extends New_processBaseItemSemanticEditPolicy {
17:
18: /**
19: * @generated
20: */
21: protected Command getCreateCommand(CreateElementRequest req) {
22: if (New_processElementTypes.Loader_3013 == req.getElementType()) {
23: if (req.getContainmentFeature() == null) {
24: req.setContainmentFeature(NewprocessPackage.eINSTANCE
25: .getGlobals_HasLoader());
26: }
27: return getMSLWrapper(new LoaderCreateCommand(req));
28: }
29: return super .getCreateCommand(req);
30: }
31:
32: @Override
33: protected Command getDestroyElementCommand(DestroyElementRequest req) {
34: return UnexecutableCommand.INSTANCE;
35: }
36: }
|