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 58991 - Disabling/Enabling FolderLookup recursivity
Summary: Disabling/Enabling FolderLookup recursivity
Status: RESOLVED WONTFIX
Alias: None
Product: platform
Classification: Unclassified
Component: Lookup (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jaroslav Tulach
URL:
Keywords: API
Depends on: 169338
Blocks:
  Show dependency tree
 
Reported: 2005-05-17 14:51 UTC by Martin Roskanin
Modified: 2009-10-14 15:45 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Mentioned testRecursivity test addition into FolderLookupTest (2.38 KB, text/plain)
2005-05-17 14:53 UTC, Martin Roskanin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Roskanin 2005-05-17 14:51:50 UTC
FolderLookup work recursively now.
If there is an instance file in folder structure like:
"AAA/BBB/java-lang-String.instance"
then FolderLookup finds this file also using FolderLookup over parent "AAA"
folder FO.

There should be possibility to specify (or enable/disable) the recursivity
behaviour of FolderLookup.

I am attaching test, that consider a factory:
public static Lookup folderLookup (FileObject fo, boolean recursive);
for obtaining recursivity dependent lookup
Comment 1 Martin Roskanin 2005-05-17 14:53:40 UTC
Created attachment 22164 [details]
Mentioned testRecursivity test addition into FolderLookupTest
Comment 2 Jaroslav Tulach 2005-05-18 08:43:21 UTC
Radek, this seems like another request for Lookup for a folder in system 
filesystem. 
 
I think adding FolderLookup.folderLookup static factory method is good idea, 
there should be no problems implementing it, as for non-recursive folder one 
only needs subclass FolderLookup and override acceptFolder & acceptContainer 
to return null. 
 
I would like to see the factory method in org.openide.options package. For 
Settings.contextLookup(String name), but I am affraid we cannot implement it 
right now, as there would be unwanted behaviour of autosave, which we probably 
do not want to preserve in future. 
 
Comment 3 Antonin Nebuzelsky 2008-04-15 17:12:09 UTC
Reassigning to new module owner jskrivanek.
Comment 4 Jaroslav Tulach 2008-11-21 23:09:44 UTC
In case somebody needs this, it is enough to subclass FolderLookup and override acceptFolder method. Anyway the whole 
FolderLookup is deprecated, people are supposed to use Lookups.forPath instead.
Comment 5 Jesse Glick 2009-10-14 15:45:20 UTC
For reference, working patch was in issue #169338 but was rejected during API review.