D11940: Penalize matches in the shared project prefix path
Milian Wolff
noreply at phabricator.kde.org
Wed Apr 4 23:34:09 UTC 2018
mwolff created this revision.
Restricted Application added a subscriber: kdevelop-devel.
mwolff requested review of this revision.
REVISION SUMMARY
This is a refinement of the previous patch, which isn't perfect yet:
Assume you have a project at /A/B/C. Now, you have
these two files in there:
/A/B/C/D/file
/A/B/C/C/E/file
Note also how quickopen trims the shared prefix path when it displays
the results:
D/file
C/E/file
When you search for C/file, both files used to get the same quality,
even though the former one matches only in the shared prefix path
of the project.
This patch adds a penalty when the match happens in the shared
prefix. Thus, when you search for C/file you'd now get the second
path preferred. This is imo much more desirable.
The benchmark timings are still pretty much the same.
REPOSITORY
R32 KDevelop
REVISION DETAIL
https://phabricator.kde.org/D11940
AFFECTED FILES
kdevplatform/language/interfaces/abbreviations.cpp
kdevplatform/language/interfaces/abbreviations.h
kdevplatform/language/interfaces/quickopenfilter.h
plugins/quickopen/projectfilequickopen.h
plugins/quickopen/tests/quickopentestbase.h
plugins/quickopen/tests/test_quickopen.cpp
To: mwolff
Cc: kdevelop-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20180404/06e6de82/attachment.html>
More information about the KDevelop-devel
mailing list