|
|
Re: EMF, GEF overlapping interfaces [message #384461 is a reply to message #384458] |
Tue, 27 April 2004 14:32 |
Eclipse User |
|
|
|
Originally posted by: richkulp.NO.SPAM.us.ibm.com
You don't need to have your editparts implement Adapter to receive
notification. We use this paradigm instead:
public clas MyEditpart extends SomeotherEditPart {
private Adapter emfAdapter = new AdapterImpl() {
public void notifyChanged(Notification notification) {
... do what is necessary for the notification, call
other methods within MyEditPart, etc.
}
};
public void activate() {
super.activate();
((EObject) getModel()).eAdapters().add(emfAdapter);
}
public void deactivate() {
super.deactivate();
((EObject) getModel()).eAdapters().remove(emfAdapter);
}
}
--
Thanks, Rich Kulp
|
|
|
|
Powered by
FUDForum. Page generated in 0.22942 seconds