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.

Bug 53073

Summary: Support for synchronous & asynchronous ViewModels implementation fixed.
Product: debugger Reporter: Jan Jancura <jjancura>
Component: CodeAssignee: issues@debugger <issues>
Status: VERIFIED FIXED    
Severity: blocker CC: arseniy, rkubacki
Priority: P2 Keywords: API_REVIEW_FAST
Version: 4.x   
Hardware: PC   
OS: Windows ME/2000   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 46614    
Attachments: Diff

Description Jan Jancura 2005-01-06 17:40:12 UTC
Support for synchronous & asynchronous ViewModels
implementations is one of the major 
                ViewModel API requirements. During
fixing of #46614 (toString update should not run 
                in AWT thread) I have realized,
that current support for asynchronous ViewModels 
                implementations is not usable.
This change fixes the problem. 
                1) ComputingException, and
NoInformationException removed - as completely
useless.
                2) All methods throwing these
exceptions changed.
                3) New ViewModel implementation
supports asynchronous model only. Its fast & safe.
Comment 1 Jan Jancura 2005-01-06 17:44:38 UTC
I am asking for review.
Comment 2 Jan Jancura 2005-01-06 17:54:31 UTC
Created attachment 19533 [details]
Diff
Comment 3 Jaroslav Tulach 2005-01-07 10:03:53 UTC
1. you do not want to use RP.getDefault(), create your own
2. use ErrorManager and not System.println
3. if this is supposed to be incompatible change, then increase major
number of your module
4. write test for proper async behaviour of TreeModelNode

Requests (imho) are #1, #3, #4
Advice is #2
Comment 4 Jan Jancura 2005-01-07 10:45:02 UTC
add 1) why?
add 4) can you advice me how to write tests for such type of
functionality, please?
Comment 5 Jaroslav Tulach 2005-01-12 10:27:11 UTC
#1 - because when you send tons of requests to RP.getDefault() you 
block the rest of the ide and moreover you want RP with throughput 1 
so all your requests are serialized one by one 
 
#4 - test behaviour of viewmodel nodes. when you call getName from 
AWT, check that the request to the model is sent in other thread and 
that AWT runs with some default value, then make sure the change is 
fired as soon as the value is computed, also check that only one 
request is processed at a time, if that is the desired behaviour. 
Comment 6 Jan Jancura 2005-02-03 08:43:56 UTC
Code in trunk, review done, waiting on test -> no41
Comment 7 Jaroslav Tulach 2005-02-03 09:14:46 UTC
According to description of NO41 keyword, the issue is said to not
apply to 4.1, but it does. The code is integrated just because you did
not respect our rules. No review would let you integrate this API
change without tests. It is your reposibility of integrating feature
that is not ready and it is your reponsibility to fix that for 4.1.
Comment 8 Jaroslav Tulach 2005-02-10 19:26:59 UTC
Waiver on test rejected. Even if apireviews do not want to block beta
with this issue, apireviews are ready to block release.
Comment 9 Jaroslav Tulach 2005-03-07 13:58:34 UTC
I've just talked with Hanz about waste-of-resources problem that I
observed in current implementation and that I am ready to track down
by writing the test:

when I do step several times, I've noticed that many requests for
values are scheduled after each step and all of them are computed,
even it is clear that the results are no longer needed. 

It is expected that the performance of the debugger could be increased
if no longer needed requests were canceled before calling to the debuggee.
Comment 10 Jan Jancura 2005-04-15 09:43:44 UTC
The test is done. It checks:
1) If Model returns valid data.
2) All model methods are called in RP.
3) All model methods are called just once (it currently failes for Root node)
Comment 11 Jiri Kovalsky 2006-08-01 14:47:22 UTC
Verifying on Hanz' behalf.