I try to use PropertyChangeListener to refresh element views in my plugin.
It works well for simple properties, like name, documentation or visibility, but there are problems with propeties referencing other elements, e.g. type, or childAdded and childRemoved. The getNewValue() method of event object doesn’t return added or removed element, but it returns any strange object.
How can I obtain a reference to added child or setted type?
Glad to inform you that this problem is fixed in Service Pack 1. I will inform you once it is released.
This feature really impressed me.
Is it good idea to observe all elements of a given type nad react to changes on it (e.g. all classes with given stereotype), or it consumes too much resources?
I do not think the action you said would consume much resources.
I just tried fixed propertychangelisteners. Works fine.
Yes, this is fixed in Service Pack 1