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.
Please consider speeding up the DataObject.files () for the most common cases of usage by providing lazy Set that will compute its values on demand. So checkFiles (a method to recognize secondary entries) will not be called until really needed. The most common operation is just call files () and do nothing ;-) As is done in DataNode.getDisplayName () if the underlaying filesystem is local file system (a FileSystem.annotateName method is called which does nothing). To speed up this case simple lazy Set is enough. The second most common operation is files ().iterator ().next () done in core.projects.SystemFileSystem.annotateName (...) which is not used as offen (templates and other stuff on default filesystem), but speedup would be nice. To speed up this case an enhancement to the lazy set that will return DataObject.getPrimaryFile () as first item of the set is needed and only when somebody asks for more items the checkFiles is called and rest of the set initialized. Please consider making this a new (package private) class in loaders package - creating new innerclasses in MultiDataObject would probably not be so nice.
Not a bug, because it does not stop anything right now, but I would like to see this fixed for next version. => EHN + P2
Target milestone -> 3.3.1.
*** Issue 19021 has been marked as a duplicate of this issue. ***
While implementing this, please take into consideration the requirements of #19021, i.e. the Set's iterator should keep the same order over the time but the order should be computer lazily too. And don't forget to document the special behaviour.
Implemented in org.openide.loaders.FilesSet class. Test was written for it: org.openide.loaders.MultiFileObjectFilesTest
Ok, verified.
Resolved for 3.4.x or earlier, no new info since then -> closing.