FolderLookup work recursively now.
If there is an instance file in folder structure like:
then FolderLookup finds this file also using FolderLookup over parent "AAA"
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
Created attachment 22164 [details]
Mentioned testRecursivity test addition into FolderLookupTest
Radek, this seems like another request for Lookup for a folder in system
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.
Reassigning to new module owner jskrivanek.
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.
For reference, working patch was in issue #169338 but was rejected during API review.