Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 58991 - Disabling/Enabling FolderLookup recursivity
Disabling/Enabling FolderLookup recursivity
Status: RESOLVED WONTFIX
Product: platform
Classification: Unclassified
Component: Lookup
5.x
All All
: P3 (vote)
: 6.x
Assigned To: Jaroslav Tulach
issues@platform
: API
Depends on: 169338
Blocks:
  Show dependency treegraph
 
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
:


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.


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