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 189924 - find/search in projects does not look into include path
Summary: find/search in projects does not look into include path
Status: RESOLVED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: Project (show other bugs)
Version: 6.x
Hardware: PC Linux
: P2 normal (vote)
Assignee: rmatous
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-26 19:03 UTC by ainsus
Modified: 2010-09-02 06:54 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
attached patch (2.55 KB, patch)
2010-08-30 14:13 UTC, rmatous
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description ainsus 2010-08-26 19:03:56 UTC
The problem:
I have included some folders to the project include path. If I search a specific string in my project, the files under the project include path are not considered. In other words, even if the string I am searching for occurs in any of the files under my project include path, it is not shown in Search Results.
Expected behaviour:
All occurrences displayed.
Comment 1 rmatous 2010-08-30 13:23:49 UTC
just a notes:
- find usages works also for include path
- find/search on the project subnode representing include path works as expeceted
Comment 2 rmatous 2010-08-30 14:13:01 UTC
Created attachment 101748 [details]
attached patch
Comment 3 rmatous 2010-08-30 14:19:35 UTC
Tomasi, could you please review the attached fix and what's more important I would like to hear your opinion whether this should be implemented unconditionally (meaning w/o UI checkbox in options "Search also in include path")? Thanks
Comment 4 Tomas Mysik 2010-08-30 14:53:20 UTC
(In reply to comment #3)
> Tomasi, could you please review the attached fix

Patch seems to be OK.

> what's more important I
> would like to hear your opinion whether this should be implemented
> unconditionally (meaning w/o UI checkbox in options "Search also in include
> path")?

Well, we cannot have a look at Java; so what about Ruby? In any case, I would expect that some UI for it should be present because Include Path can contain _huge_ number of files (can be _very_ slow then); also, if one wants to search in a project, then one perhaps expects that only project will be searched (moreover if one can use search on Include Path node that is present in every project).

So, I would prefer to have a checkbox for it (maybe just in Tools > Options >PHP?)
Comment 5 rmatous 2010-08-31 12:17:54 UTC
Yes, user should be aware what he can expect and what will happen - in this case that it may take more time.

But maybe we don't need additional UI checkbox because logical view may is enough for user to understand what is going to happen. So, search on(see logical view below):
- "Project" node will search in sources and include path
- "Sources" node will search in sources only
- "Include Path" node will search in include path only

Logical View looks like this:
.
|-- Project
|   `-- Sources
|   `-- Include Path

So, I suggest to put in in according to patch (1:1) without additional checkbox because seems to me to be clear and not confusing from user point of view
Comment 6 Tomas Mysik 2010-08-31 12:57:36 UTC
How to search only in project directory, without the include path? There would be no way to do it. Please notice that the project directory can contain a lot more files than just Source Files.
Comment 7 rmatous 2010-08-31 13:25:04 UTC
.
|-- Project
|   `-- Sources
|   `-- Include Path

OK, Include Path node is under project, so one can expect that it will look also in include path. On the other hand being able to switch it off might be welcomed. So, now the last decision is default value: *as default* find in include path or not?
Comment 8 Tomas Mysik 2010-08-31 13:47:24 UTC
Now I see, for searching only in project directory, one can probably use Files view. So, I guess the patch could stay as it is.
Comment 9 Tomas Mysik 2010-08-31 13:48:48 UTC
Still interested - how does it work in Ruby?
Comment 10 Quality Engineering 2010-09-02 03:18:29 UTC
Integrated into 'main-golden', will be available in build *201009020000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/8fcd37001b8b
User: Radek Matous <rmatous@netbeans.org>
Log: #189924 - find/search in projects does not look into include path
Comment 11 Tomas Mysik 2010-09-02 06:54:04 UTC
Apparently fixed, let's wait for feedback (IMHO it could be quite negative for those who have _big_ Include Path).