Review Request 127908: Find/Replace in Files: don't exclude items that trigger the exclude filter above the search location
Milian Wolff
mail at milianw.de
Tue May 24 21:27:22 UTC 2016
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127908/#review95760
-----------------------------------------------------------
personally, I think you should instead check the exclude filter against the start location of the search. If that is already excluded, show a helpful message to the user explaining that nothing can possibly be matched and that he needs to change the filter then
- Milian Wolff
On May 14, 2016, 6:52 a.m., René J.V. Bertin wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/127908/
> -----------------------------------------------------------
>
> (Updated May 14, 2016, 6:52 a.m.)
>
>
> Review request for KDevelop.
>
>
> Repository: kdevplatform
>
>
> Description
> -------
>
> "Find/Replace in Files" has an include and an exclude filter. The former serves to consider only files matching a pattern under the search location. The latter serves to exclude files matching a pattern, but considers the full path.
>
> The standard exclude pattern contains the pattern `/build/`, to exclude the build directory. Filtering on the full path means that it is not possible to search in a location that has an ancestor called `build`.
>
> This patch attempts to mask the patch above the search location from the exclude filter.
>
> It could even mask the search location itself from that filter, which would allow to search e.g. in a typical build directory by setting the location to that directory, and without having to edit the exclude filter.
>
> I'm not very proud of the expression used to determine the location's `dirName`, but I saw no better way since it presumably has to be a canonical (normalised) path and there is no `dirName()` method.
>
>
> Diffs
> -----
>
> plugins/grepview/grepfindthread.cpp 9388d5c
>
> Diff: https://git.reviewboard.kde.org/r/127908/diff/
>
>
> Testing
> -------
>
> Search now works as I'd expect (when searching the files of a project) regardless of where the search location is stored.
>
>
> Thanks,
>
> René J.V. Bertin
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20160524/41b20342/attachment-0001.html>
More information about the KDevelop-devel
mailing list