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.
Summary: | Viewmodel: Enhance ModelEvent | ||
---|---|---|---|
Product: | debugger | Reporter: | Martin Entlicher <mentlicher> |
Component: | Code | Assignee: | Martin Entlicher <mentlicher> |
Status: | CLOSED FIXED | ||
Severity: | blocker | Keywords: | API, API_REVIEW_FAST |
Priority: | P2 | ||
Version: | 5.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | TASK | Exception Reporter: | |
Bug Depends on: | |||
Bug Blocks: | 57835, 61082 | ||
Attachments: |
The proposed API change
The changes in the implementation. Just FYI. The API change with updated Javadoc. |
Description
Martin Entlicher
2005-06-24 18:24:40 UTC
I suggest to add a new constructor to ModelEvent.NodeChanged: NodeChanged(Object source, Object node, int change) and method: public int getChange() The change can be a combination of constants: int DISPLAY_CHANGE, ICON_CHANGE, SHORT_DESCRIPTION_CHANGE and CHILDREN_CHANGE. The default change will be -1 (all above changes) Comments? Created attachment 23106 [details]
The proposed API change
I'm asking for the review - it should be non-controversial, only simple API addition. Created attachment 23107 [details]
The changes in the implementation. Just FYI.
What it isjavax.naming.ldap.ExtendedResponse? How and when that interface got into the APIs? I have not actually found the API change!? Should not there be new constructor in the ModelEvent.NodeChanged? I have not found that in the diff. There are debug messages in your code. There is no update to the apichanges, no increment of module version and no change in other module dependencies. And I am really sorry for repeating myself, there is no test. Write one. Yarda, you probably missed the first attachment. The change is going to remove an ugly hack from debugger code. The event needs additional information that was passed using hidden contract: if the event is actually instanceof ExtendedResponse than you can call a method getID to obtain this value. OK - javadoc for new constructor is missing and there is some debug message but I agree with it. (Is it second round of refining events in debuger now?) Tests? these will be silly unit test just to get coverage in this case unless you start to test that certain parts of debugger UI fire just neceseary change. However this issue probably does not solve how much functionality in debuger will be covered by tests. Created attachment 23143 [details]
The API change with updated Javadoc.
Thanks Radim for you comments. I've added the missing Javadoc. The debug message in the impl. will not be committed, of course... There are not many tests for the viewmodel. :-( This change does not contain tests, because there is no existing test for event firing that could be extended... I'll commit this change shortly. There will be also a simple test for it. Other tests that are in viewmodel module do not pass, since the event listeners are attached multiple times. This needs to be solved separately. Committed into trunk: /cvs/debuggerjpda/ui/src/org/netbeans/modules/debugger/jpda/ui/models/VariablesTreeModelFilter.java,v <-- VariablesTreeModelFilter.java new revision: 1.10; previous revision: 1.9 /cvs/debuggerjpda/src/org/netbeans/modules/debugger/jpda/models/WatchesModel.java,v <-- WatchesModel.java new revision: 1.20; previous revision: 1.19 /cvs/debuggercore/src/org/netbeans/modules/debugger/ui/models/WatchesTreeModel.java,v <-- WatchesTreeModel.java new revision: 1.7; previous revision: 1.6 /cvs/debuggercore/viewmodel/apichanges.xml,v <-- apichanges.xml new revision: 1.14; previous revision: 1.13 /cvs/debuggercore/viewmodel/manifest.mf,v <-- manifest.mf new revision: 1.12; previous revision: 1.11 /cvs/debuggerjpda/nbproject/project.xml,v <-- project.xml new revision: 1.11; previous revision: 1.10 /cvs/debuggercore/viewmodel/src/org/netbeans/modules/viewmodel/TreeModelNode.java,v <-- TreeModelNode.java new revision: 1.37; previous revision: 1.36 /cvs/debuggercore/viewmodel/src/org/netbeans/modules/viewmodel/TreeModelRoot.java,v <-- TreeModelRoot.java new revision: 1.13; previous revision: 1.12 /cvs/debuggercore/viewmodel/src/org/netbeans/modules/viewmodel/TreeTable.java,v <-- TreeTable.java new revision: 1.21; previous revision: 1.20 /cvs/debuggercore/viewmodel/test/unit/src/org/netbeans/api/viewmodel/BasicTest.java,v <-- BasicTest.java new revision: 1.8; previous revision: 1.7 RCS file: /cvs/debuggercore/viewmodel/test/unit/src/org/netbeans/api/viewmodel/ModelEventTest.java,v Checking in debuggercore/viewmodel/test/unit/src/org/netbeans/api/viewmodel/ModelEventTest.java; /cvs/debuggercore/viewmodel/test/unit/src/org/netbeans/api/viewmodel/ModelEventTest.java,v <-- ModelEventTest.java initial revision: 1.1 /cvs/debuggercore/viewmodel/src/org/netbeans/spi/viewmodel/ModelEvent.java,v <-- ModelEvent.java new revision: 1.3; previous revision: 1.2 /cvs/debuggercore/viewmodel/src/org/netbeans/spi/viewmodel/Models.java,v <-- Models.java new revision: 1.23; previous revision: 1.22 Verified ... and Closing all issues resolved into NetBeans 6.7 and earlier. |