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 178634 - PhpProject: "Ignored folders" property doesn't impact "Find in projects ..."
Summary: PhpProject: "Ignored folders" property doesn't impact "Find in projects ..."
Status: RESOLVED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: Project (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 normal (vote)
Assignee: Tomas Mysik
URL: http://forums.netbeans.org/topic20903...
Keywords:
: 167152 178821 180574 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-12-15 00:32 UTC by redic1
Modified: 2010-04-06 12:10 UTC (History)
4 users (show)

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 redic1 2009-12-15 00:32:17 UTC
Hi all!
I have "ignored folders" in my project.
NetBeand does not scan them while "scanning projects", but it find occurenses while "find in projects..." in these folders.
I think NetBeans should ignore files from "ignored folders" in "find in projects...".
Comment 1 redic1 2009-12-22 01:15:08 UTC
Also i get "go to declaration" suggestions with classes in "ignored folders"
Comment 2 Alexei Mokeev 2010-02-16 02:08:20 UTC
Checked with 6.8 FCS - WFM, excluded files are not appeared in search results.

Please check your exclude pattern, feel free to post it here.
Comment 3 redic1 2010-02-16 02:36:40 UTC
It is really true, that "excluded files" are not appeared in search results.
But i'm talking about "ignored folders", which are differnt from "excluded files".
I need to ignore all files and folders recursively in one selected folder.
I added some folder like "/home/red/htdocs/project/ignore" to "ignored folders" in NB project properties and i want "/home/red/htdocs/project/ignore/*" to be ignored in "find in projects" and "go to declaration" in addition to "scanning projects".
Comment 4 Alexei Mokeev 2010-02-16 03:11:22 UTC
Got the point. Your are talking about "Ignored Folders" property of PHP projects.
Reproducible with 6.8 FCS.
Comment 5 Alexei Mokeev 2010-02-16 03:13:35 UTC
*** Bug 178821 has been marked as a duplicate of this bug. ***
Comment 6 Alexei Mokeev 2010-02-16 05:45:44 UTC
Moving to PHP project.
Please put into lookup an implementation of org.openidex.search.SearchInfo.Files that would provide list of files based on PHP project properties.
Comment 7 Alexei Mokeev 2010-02-17 00:02:59 UTC
*** Bug 180574 has been marked as a duplicate of this bug. ***
Comment 8 Tomas Mysik 2010-02-18 02:25:39 UTC
Fixed.
http://hg.netbeans.org/web-main/rev/e6b3c494955b
Comment 9 Alexei Mokeev 2010-02-18 05:41:04 UTC
Thanks for the quick implementation. Just note, that you could speed-up search in PHP projects by implementing SearchInfo.Files instead of SearchInfo and proving extra method "public Iterator<FileObject> filesToSearch()". In latter case file objects are used instead of data objects and this minimize time and memory consumption.
Comment 10 Tomas Mysik 2010-02-18 06:26:11 UTC
(In reply to comment #9)
> Thanks for the quick implementation.

Nothing to thank for, of course.

> Just note, that you could speed-up search
> in PHP projects by implementing SearchInfo.Files instead of SearchInfo and
> proving extra method "public Iterator<FileObject> filesToSearch()". In latter
> case file objects are used instead of data objects and this minimize time and
> memory consumption.

Well, that API seems to be a bit confusing (or at least not easy to undestand and use) to me because the Javadoc for filesToSearch() says:

> Specifies which <code>FileObject</code>s should be searched.

Does it mean that I need to provide_all_ the FileObjects? Likely yes. Why? I don't want to do that, I want to specify the root and then provide just FileObjectFilter. OK, there's already such possibility using SearchInfoFactory but unfortunately, it does not provide implementation for SearchInfo.Files but only for SearchInfo. BTW it is _nowhere_ written that SearchInfo.Files is preferred, it definitely should be if it is so.

Next question - if I implement SearchInfo.Files - what's the purpose of objectsToSearch() method? Is it used or not? It is not written in Javadoc so I guess it is used. OK, but I don't want to implement it (in case of my own implementation of SearchInfo.Files) because I _strongly_ prefer to use the existing SearchInfoFactory (it works, it's fast etc. - or not?).

To speed up _all_ things (not only PHP project), feel free to improve SearchInfoFactory to provide implementation for SearchInfo.Files as well, then _all_ API users will benefit from filesToSearch method. Also, fix Javadoc if it's missing some important thing (and speed is important, IMHO).

Thanks.
Comment 11 Tomas Mysik 2010-02-18 06:33:15 UTC
(In reply to comment #10)
> To speed up _all_ things (not only PHP project), feel free to improve
> SearchInfoFactory to provide implementation for SearchInfo.Files as well, then
> _all_ API users will benefit from filesToSearch method. Also, fix Javadoc if
> it's missing some important thing (and speed is important, IMHO).

One more comment - and change the existing methods of SearchInfoFactory to return SearchInfo.Files implementations - it will be faster for all the API users _automatically_.

Thanks.
Comment 12 Tomas Mysik 2010-02-18 06:41:20 UTC
(In reply to comment #11)
> One more comment - and change the existing methods of SearchInfoFactory to
> return SearchInfo.Files implementations - it will be faster for all the API
> users _automatically_.

Sorry, I just realized (unfortunately only from sources) that this is already done. But still, there's no method returning SearchInfo.Files implementation in SearchInfoFactory and also Javadoc says only "SearchInfo" everywhere.
Comment 13 Tomas Mysik 2010-02-18 06:59:34 UTC
SearchInfo.Files used (with assert).
http://hg.netbeans.org/web-main/rev/1fd2956891c1
Comment 14 Quality Engineering 2010-02-18 21:49:55 UTC
Integrated into 'main-golden', will be available in build *201002190200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/e6b3c494955b
User: Tomas Mysik <tmysik@netbeans.org>
Log: #178634: PhpProject: "Ignored folders" property doesn't impact "Find in projects ..."
Comment 15 Alexei Mokeev 2010-02-19 03:01:51 UTC
Filed an issue against JavaDoc for SearchInfo: #180952 . It certainly not as clear as it should be.
Comment 16 Victor Vasilyev 2010-04-06 12:10:03 UTC
*** Bug 167152 has been marked as a duplicate of this bug. ***