01: package newprocess.adapter;
02:
03: import newprocess.ConditionTerm;
04: import newprocess.NewprocessPackage;
05: import newprocess.Term;
06:
07: import org.eclipse.emf.common.notify.Notification;
08: import org.eclipse.emf.common.notify.impl.SingletonAdapterImpl;
09:
10: /**
11: * @author sh
12: *
13: */
14: public class ConditionTermAdapter extends SingletonAdapterImpl {
15: // Singleton
16: public static ConditionTermAdapter INSTANCE = new ConditionTermAdapter();
17:
18: /**
19: * If a Term has been deleted we perform an update to set the expression
20: */
21: public void notifyChanged(Notification msg) {
22: super .notifyChanged(msg);
23:
24: int featureID = msg.getFeatureID(NewprocessPackage.class);
25: if (msg.getEventType() == Notification.SET
26: && msg.getNotifier() instanceof ConditionTerm) {
27: ((Term) msg.getNotifier()).performUpdate();
28: }
29: }
30: }
|