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.
The setting: Source Files->Subfolder->Subfolder1.1 Source Files->Subfolder->Subfolder1.2 (Ignored by "ignored folders") If you use "Find .." on "Subfolder", NB will find results in Subfolder1.2, which should be ignored. If you use "Find .." on "Source Files" or on the Project-Root (on Project Tree) it will correctly ignore Subfolder1.2. This is not the same Bug as descripted in Bug 178634.
The problem seems to be in the Search component since the FileObjectFilter (provided by PhpProject) is not used when calling Find on a folder underneath Source Files. The FileObjectFilter is called when searching on the project itself or on its Source Files node. Please evaluate (steps in the initial description), thanks.
You are right, Tomas. Missing FileObjectFilter causes this. 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. Please, are you able to add custom SearchInfo to all project folders? Would you prefer some API changes? Thank you.
(In reply to comment #2) > 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. Well, I don't know this area at all, but I would perhaps prefer the (b) option since it would - at least I hope - avoid any regression; or, do you think that the (a) option could cause any regression or unexpected behavior in the existing code? > Please, are you able to add custom SearchInfo to all project folders? This should be possible but I'm not sure whether it is the "right" thing to do, see above. Also, that would mean to create as many SearchInfo instances as Subfolder nodes, right? I would definitely prefer to create one instance of *something* and share it or put it to the lookup of the root node. Does it make sense? Of course, this would be tailored exactly for this situation, not sure whether it is a common (or the most common) use case or not... Anyway, I will try to do it. I will update this issue soon. Thanks.
(In reply to comment #3) > Anyway, I will try to do it. I will update this issue soon. It works for me now, so reassigning back and fixing. http://hg.netbeans.org/web-main/rev/44a178ed6b66 However, I have filed issue #202171, feel free to close/change/fix it. If the issue #202171 is fixed, this fix can be removed/simplified. Thanks.
Thank you very much, Tomas.
(In reply to comment #5) > Thank you very much, Tomas. Nothing to thank for.
Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/44a178ed6b66 User: Tomas Mysik <tmysik@netbeans.org> Log: #200297 - "Find ..." used on a subfolder does not ignore "Ignored Folders"
Thanx. You are hero :)
(In reply to comment #8) > Thanx. You are hero :) No way :)