Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 198665 - NbPreferences don't reload when underlying file is changed
NbPreferences don't reload when underlying file is changed
Status: RESOLVED FIXED
Product: platform
Classification: Unclassified
Component: Options&Settings
7.1
Other Linux
: P3 (vote)
: TBD
Assigned To: Theofanis Oikonomou
issues@platform
:
Depends on: 200114
Blocks: 197594
  Show dependency treegraph
 
Reported: 2011-05-17 07:58 UTC by Jaroslav Tulach
Modified: 2012-03-06 10:55 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
Test and impl for automatic reload if underlaying store file is changed (10.94 KB, patch)
2011-05-17 07:58 UTC, Jaroslav Tulach
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo