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 170727 - Detect external change among children of a folder
Summary: Detect external change among children of a folder
Status: RESOLVED WONTFIX
Alias: None
Product: platform
Classification: Unclassified
Component: Filesystems (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jiri Skrivanek
URL:
Keywords:
Depends on:
Blocks: 168237
  Show dependency tree
 
Reported: 2009-08-20 17:59 UTC by Jaroslav Tulach
Modified: 2009-08-31 16:30 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
The test (7.16 KB, patch)
2009-08-20 18:00 UTC, Jaroslav Tulach
Details | Diff
Possible implementation (12.62 KB, patch)
2009-08-20 22:31 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 2009-08-20 17:59:23 UTC
One way to fix issue 168237 is to keep all FileObjects in memory to guarantee external changes will be notified. 
However there can be a lot of FileObjects and keeping them all in memory could be too resource consuming. 

But it would be enough to keep just folders! They receive events for changes made in children, so keeping folders 
might be enough. They even detect additions are removals of children done externally. However there is one problem, 
external touch is not detected.

I am going to attach test to demonstrate the problem. Just the first test is failing, the other tests (for create and 
delete) work.
Comment 1 Jaroslav Tulach 2009-08-20 18:00:21 UTC
Created attachment 86512 [details]
The test
Comment 2 Jaroslav Tulach 2009-08-20 22:31:36 UTC
Created attachment 86516 [details]
Possible implementation
Comment 3 Jaroslav Tulach 2009-08-31 16:29:35 UTC
Not really needed by itself. Better to implement addRecursiveListener, as proposed in issue 170862.