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 9900 - Files -> Nodes synchronization issue
Summary: Files -> Nodes synchronization issue
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: PC All
: P1 blocker (vote)
Assignee: rmatous
URL:
Keywords:
Depends on:
Blocks: 9826
  Show dependency tree
 
Reported: 2001-03-01 15:23 UTC by Tomas Pavek
Modified: 2008-12-22 23:31 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Pavek 2001-03-01 15:23:27 UTC
I think there's a serious bug in the way how changes in files (merged with 
XMLFileSystem) are repopulated to nodes representing the files. See bug 9826 
for details.

The problem can be seen when installing larger number of beans (a jar is 
available in bug 9826 attachment id=697). For the best performance, turn-off 
the component palette and open Options->Component Palette -> Beans. Then 
install all beans to Beans category. You'll see an amazing animation - nodes 
being added and removed, finishing with random subset of required nodes 
visible. Now you can un-hide Default filesystem and expand nodes in explorer to 
see the Beans category also here. It looks OK (all nodes present). But if you 
delete the beans and install again (with Default FS expanded) you'll see a 
similar "animation", but ending up with another subset of nodes than in Options.

What is happening during beans installation?
When beans are installed to certain category, instance files are created for 
them in corresponding directory. These files are created correctly. (Then must 
be merged with XMLFileSystem of layer.xml file - I think this is important.) On 
the other side, there's a DataFolder.FolderNode subclass (representing the 
category) listening on changes and updating its children. But there's a bug 
somwhere in between...

[Use e.g. NetBeans dev build 134. Happens also on Solaris.]
Comment 1 Jesse Glick 2001-03-01 17:20:12 UTC
Radek please accept this if it is really yours, I am not sure.
Comment 2 Tomas Pavek 2001-03-02 13:37:08 UTC
Actually, now I think there need not be a relation to merging with 
XMLFileSystem necessarily - the content of filesystem looks OK and also all 
changes seem to be fired. Maybe it's some sync problem with nodes updating...
Comment 3 Jan Chalupa 2001-03-12 12:09:53 UTC
Version: 'Dev' -> 3.2
Comment 4 rmatous 2001-03-22 23:05:48 UTC
MultiFileObject fired event fileCreated twice. I fixed it in trunk and 
release32. After that fix I consider behaviour of MFS OK. This change did not 
affect problems described in this bug. I found out that FolderList gets events 
from MultiFileObject OK but FolderList fires events chaotically up. That is 
reason why I assigned bug  to: bugs@openide.netbeans.org. 
Comment 5 Jaroslav Tulach 2001-03-26 16:32:14 UTC
Seems like a bug between DataFolder.FolderNode and loaders. I'll try to
investigate this, but most of the work is probably up-to you.
Comment 6 Jaroslav Tulach 2001-03-27 07:27:19 UTC
The problem is that tasks in RequestProcessor need not be executed in the order
they arrive.
Comment 7 Jaroslav Tulach 2001-03-27 10:11:27 UTC
RequestProcessor, rev. 1.43
Comment 8 _ ttran 2001-04-02 16:44:41 UTC
does not work, reopened and upped priority to P1 because it blocks a major
functionality in the form editor.

The bug is reproducible.  See #9826, try install just one bean from the attached
jar file.  The jar is mounted and the instance file is created physically but I
never see a corresponding node under system/Palette/Beans even after Refresh
folder and some times even after restarting the IDE.

The piece of code which installs beans is
org.netbeans.modules.form.palette.BeanInstaller.installBeans(JarFileSystem jar,
Collection beans, String category)
Comment 9 Jaroslav Tulach 2001-04-03 08:28:43 UTC
Try to run the IDE with -Dorg.openide.loaders.FolderList=0 switch and you will
see that the default filesystem does not notify the FolderList about the change.
The bug is now probably in MFS.
Comment 10 rmatous 2001-04-03 14:00:56 UTC
Fixed in trunk and release32.

When I convinced you that MFS fires events to FolderList correcctly it was 
true. But fix of #10507 changed completely way of firing events (firing of 
events was postponed after lock is released). Due to #10507 became  my fix of 
#9900 (preventing fire event fileCreated twice) disserviceable. 
Comment 11 Jan Zajicek 2001-05-03 12:50:32 UTC
seems to work now
Comment 12 Jan Chalupa 2001-05-06 08:21:52 UTC
Target milestone -> 3.2
Comment 13 Quality Engineering 2003-07-01 16:30:38 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.