01: package newprocess.diagram.edit.policies;
02:
03: import org.eclipse.gef.commands.Command;
04: import org.eclipse.gmf.runtime.emf.type.core.commands.DestroyElementCommand;
05: import org.eclipse.gef.commands.UnexecutableCommand;
06: import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
07: import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
08: import org.eclipse.emf.ecore.EObject;
09: import org.eclipse.emf.ecore.EAnnotation;
10: import org.eclipse.gmf.runtime.notation.View;
11:
12: /**
13: * @generated
14: */
15: public class GlobalsItemSemanticEditPolicy extends
16: New_processBaseItemSemanticEditPolicy {
17:
18: /**
19: * @generated NOT
20: * @author sh
21: */
22: protected Command getDestroyElementCommand(DestroyElementRequest req) {
23: /*
24: return getMSLWrapper(new DestroyElementCommand(req) {
25:
26: protected EObject getElementToDestroy() {
27: View view = (View) getHost().getModel();
28: EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
29: if (annotation != null) {
30: return view;
31: }
32: return super.getElementToDestroy();
33: }
34:
35: });
36: */
37: return UnexecutableCommand.INSTANCE;
38: }
39:
40: /**
41: * @generated
42: */
43: protected Command getCreateRelationshipCommand(
44: CreateRelationshipRequest req) {
45: return super.getCreateRelationshipCommand(req);
46: }
47: }
|