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 202171 - SearchInfo must be provided for each subnode
Summary: SearchInfo must be provided for each subnode
Status: RESOLVED FIXED
Alias: None
Product: utilities
Classification: Unclassified
Component: Search (show other bugs)
Version: 7.1
Hardware: All All
: P3 normal (vote)
Assignee: Jaroslav Havlin
URL:
Keywords:
Depends on: 207436
Blocks: 200297
  Show dependency tree
 
Reported: 2011-09-15 10:00 UTC by Tomas Mysik
Modified: 2012-03-19 15:47 UTC (History)
0 users

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 Mysik 2011-09-15 10:00:34 UTC
Based on issue #200297. From the description #2:

----- %< -----
FileObjectFilters are set in SearchInfo instances, that are stored 
in lookups of nodes. If no SearchInfo is registered in node's lookup, 
default SearchInfo is used.

So, the primary problem is that the node representing folder "Subfolder" 
does not contain correct SearchInfo in its lookup.

I think that the only way to fix this is currently to add correct 
SearchInfo to all folders underneath the project root.

Unfortunately, recursively searching for parent node with registered 
SearchInfo is not an option here, as FileObjectFilters are encapsulated 
in SearchInfo instances and are not publicly visible.

But we could change API and (a) introduce method SearchInfo.getFilters 
(returning list of FileObjectFilters), or (b) register lists 
of FileObjectFilters to lookups of nodes. 
Then we could recursively search for the nearest parent with
these settings from any sub-folder.
----- %< -----

Feel free to change this issue to an enhancement or even close it as WONTFIX/INVALID.

Thanks.
Comment 1 Jaroslav Havlin 2012-03-19 15:47:51 UTC
http://hg.netbeans.org/core-main/rev/5040c9a4936c
Fixed. Filters can be defined by implementations of SubTreeSearchOptions (module api.search).