This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
[dev-139] 1. ClassElement.addMethods fires 2 JavaConnections: TYPE_METHODS_ADD and TYPE_METHODS_CHANGE, but only TYPE_METHODS_ADD shoud be fired. 2. ClassElement.addClass does not fire TYPE_CLASSES_ADD 3. ClassElement.addInitializer does not fire TYPE_INITIALIZERS_ADD 4. ClassElement.removeInitializer does not fire TYPE_INITIALIZERS_REMOVE 5. ClassElement.removeConstructors does not fire TYPE_CONSTRUCTORS_REMOVE 6. ClassElement.removeInterfaces does not fire TYPE_CLASSES_REMOVE
JavaConnections are important for other modules. -> I'm rising priority.
Version: 'Dev' -> 3.2
Fixed in release-3.2, dev-trunk.
Target milestone -> 3.2
ClassElement.addMethods still fires 2 JavaConnections: TYPE_METHODS_ADD and TYPE_METHODS_CHANGE, but only TYPE_METHODS_ADD shoud be fired. Bug is almost fixed -> changing priority.
fixed in trunk
/cvs/java/src/org/netbeans/modules/java/model/CallableImpl.java,v <-- CallableImpl.java new revision: 1.12; previous revision: 1.11 done /cvs/java/src/org/netbeans/modules/java/codesync/ModelEventAdapter.java,v <-- ModelEventAdapter.java new revision: 1.9; previous revision: 1.8 done
ClassElement.addMethods still "sometimes" fires 2 JavaConnections: TYPE_METHODS_ADD and TYPE_METHODS_CHANGE, but only TYPE_METHODS_ADD shoud be fired.
And one more issue: ClassElement.addInterface fires TYPE_CLASSES_CHANGE, but TYPE_CLASSES_ADD should be fired. ClassElement.removeInterface fires TYPE_CLASSES_CHANGE, but TYPE_CLASSES_REMOVE should be fired.
I'm postponing the solution: From the conversation with the reporter: > The root > of this bug lies in insufficient data distributed in JavaConnection > events. The module uses similar events internally; I can extend the > synchronized part so that the JavaConnection event source gets the > events in the correct order and merges them correctly; however the > client will be always outside the synchronized section (as a prevention > from deadlocks) and will always receive only partial data. > So - your test will stop to fail, but the real users will still receive > only partially useful information.
Reopening
Already fixed
Verified
Resolved for 3.4.x or earlier, no new info since then -> closing.