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 198665

Summary: NbPreferences don't reload when underlying file is changed
Product: platform Reporter: Jaroslav Tulach <jtulach>
Component: Options&SettingsAssignee: Theofanis Oikonomou <theofanis>
Status: RESOLVED FIXED    
Severity: normal CC: err, jmilkiewicz
Priority: P3    
Version: 7.1   
Hardware: Other   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Bug Depends on: 200114    
Bug Blocks: 197594    
Attachments: Test and impl for automatic reload if underlaying store file is changed

Description Jaroslav Tulach 2011-05-17 07:58:02 UTC
Created attachment 108348 [details]
Test and impl for automatic reload if underlaying store file is changed

During GeeCON 2011 Hackergarten me and Jakub Milkiewicz worked on a test and an improvement to NbPreferences, to be able to reload when its underlaying storage file changes.

I guess we succeeded to improve current state. I'll attach Jakub's patch that includes test and an implementation to make the test pass.

Yulia, can you review the code and if you are OK with the implementation apply it? I believe this change would help you improve state of bug 197594 too.
Comment 1 Quality Engineering 2011-06-10 14:47:49 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/abdf3b52a520
User: Yulia Novozhilova <ynov@netbeans.org>
Log: Fix #198665 -  NbPreferences don't reload when underlying file is changed
Comment 2 Yulia Novozhilova 2011-06-12 21:58:57 UTC
Thanks to Jarda and Jakub for the patch!
Comment 3 jmilkiewicz 2011-06-13 15:42:24 UTC
Your welcome. It was a pleasure to develop with Jaroslav. I hope we can organize some hacking at least next year.
Comment 4 err 2011-06-14 04:22:20 UTC
I think this change has problems, see bug 197594 comment 21
Comment 5 Quality Engineering 2011-06-14 04:59:20 UTC
Integrated into 'releases'
Changeset: http://hg.netbeans.org/releases/rev/1cdc8b3c5503
User: Yulia Novozhilova <ynov@netbeans.org>
Log: Fix #198665 NbPreferences don't reload when underlying file is changed
Comment 6 Jaroslav Tulach 2011-06-15 13:11:23 UTC
> I think this change has problems, see bug 197594 comment 21

Yes, we know this is not full solution to bug 197594 (especially the delivery of events is missing). Jakub and me had just one morning to implement this. Thus I reported this new bug rather modifying the old one.
Comment 7 err 2011-06-15 14:29:31 UTC
(In reply to comment #6)
> ... this is not full solution to bug 197594 ...

I was thinking more of the performance and synchronization issues introduced by a file modification rather than a file replace approach.
Comment 8 err 2011-06-22 13:53:02 UTC
The discussion in bug 197594 indicated that this fix should *not* be in 701. It was added 701 on 2011-06-14 as indicated in comment 5. Was it taken out?
Comment 9 Yulia Novozhilova 2011-06-22 15:38:21 UTC
Yes: http://hg.netbeans.org/releases/rev/4d80866be327
Comment 10 Theofanis Oikonomou 2012-03-06 10:55:26 UTC
This should be now fixed. See comment 40 in #197594