[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.modeling.mdt.uml2] No notification from classifier when package changes
|
Hi,
I just tried to attach an adapter to a Class instance to be notified as
soon as it is moved into another package.
In the code below, however, there is no notification, the sysout
statement is not reached:
Class clazz = UMLFactory.eINSTANCE.createClass();
Package package_ = UMLFactory.eINSTANCE.createPackage();
Package package_2 = UMLFactory.eINSTANCE.createPackage();
clazz.setPackage(package_);
clazz.eAdapters().add(new AdapterImpl(){
@Override
public void notifyChanged(Notification msg){
System.out.println("notified");
}
});
clazz.setPackage(package_2);
Is there a way to be notified by a Class when its package changes?
Thanks in advance,
Patrick