01: package newprocess.diagram.edit.policies;
02:
03: import org.eclipse.gmf.runtime.diagram.ui.editpolicies.CanonicalEditPolicy;
04: import org.eclipse.gmf.runtime.notation.View;
05: import java.util.LinkedList;
06: import java.util.List;
07:
08: import newprocess.Conclusion;
09:
10: import newprocess.diagram.edit.parts.Expression8EditPart;
11:
12: import newprocess.diagram.part.New_processVisualIDRegistry;
13:
14: import org.eclipse.emf.ecore.EObject;
15:
16: /**
17: * @generated
18: */
19: public class ConclusionConclusionPostconditionCompartmentCanonicalEditPolicy
20: extends CanonicalEditPolicy {
21:
22: /**
23: * @generated
24: */
25: protected List getSemanticChildrenList() {
26: List result = new LinkedList();
27: EObject modelObject = ((View) getHost().getModel())
28: .getElement();
29: View viewObject = (View) getHost().getModel();
30: EObject nextValue;
31: int nodeVID;
32: nextValue = ((Conclusion) modelObject).getHasPrecondition();
33: nodeVID = New_processVisualIDRegistry.getNodeVisualID(
34: viewObject, nextValue);
35: if (Expression8EditPart.VISUAL_ID == nodeVID) {
36: result.add(nextValue);
37: }
38: return result;
39: }
40:
41: /**
42: * @generated
43: */
44: protected boolean shouldDeleteView(View view) {
45: return view.isSetElement() && view.getElement() != null
46: && view.getElement().eIsProxy();
47: }
48:
49: /**
50: * @generated
51: */
52: protected String getDefaultFactoryHint() {
53: return null;
54: }
55:
56: }
|