Skip to content

Conversation

@howlger
Copy link
Contributor

@howlger howlger commented Feb 4, 2025

The org.eclipse.help.searchProcessor extension point allows to modify the help search results. This is done by calling the postSearch(...) method of all implementations of org.eclipse.help.search.AbstractSearchProcessor specified by this extension point. In some cases, the search results to be modified and the query that are passed as parameters to the postSearch(...) method may not be enough. So this change adds another postSearch(...) method with additional parameters like the locale and the scopes if any. The simpler postSearch(...) is be kept for backward compatibility.

Additionally, if preSearch(...) returns a SearchProcessorInfo with an empty, non-null query (""), no search will be executed, resulting in no search results or in the search results that has been added via postSearch(...).

@howlger howlger force-pushed the patch-searchProcessor branch from c74b88b to a202f0c Compare February 4, 2025 17:11
@howlger
Copy link
Contributor Author

howlger commented Feb 4, 2025

@iloveeclipse This is a work for Advantest and may be helpful for others too.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2025

Test Results

 1 758 files  + 3   1 758 suites  +3   1h 33m 24s ⏱️ +55s
 4 174 tests + 4   4 150 ✅ + 4   23 💤 ±0  1 ❌ ±0 
13 119 runs  +12  12 951 ✅ +12  167 💤 ±0  1 ❌ ±0 

For more details on these failures, see this check.

Results for commit 1a7c801. ± Comparison against base commit 87a5e5a.

♻️ This comment has been updated with latest results.

@iloveeclipse
Copy link
Member

The code looks OK, but ideally we would have new test for the new API call. Could you please check if there are any related tests that could be updated in org.eclipse.ua.tests.help.search.AllSearchTests ?

@howlger
Copy link
Contributor Author

howlger commented Feb 5, 2025

Could you please check if there are any related tests that could be updated in org.eclipse.ua.tests.help.search.AllSearchTests ?

Yes, valid point. I will add some tests for the extended API (by extending or doing something similar to org.eclipse.ua.tests.help.search.SearchParticipantTest).

@jukzi jukzi added the enhancement New feature or request label Feb 6, 2025
The `org.eclipse.help.searchProcessor` extension point allows to modify
the help search results. This is done by calling the `postSearch(...)`
method of all implementations of
`org.eclipse.help.search.AbstractSearchProcessor` specified by this
extension point. In some cases, the search results to be modified and
the query that are passed as parameters to the `postSearch(...)` method
may not be enough. So this change adds another `postSearch(...)` method
with additional parameters like the locale and the scopes if any. The
simpler `postSearch(...)` is be kept for backward compatibility.

Additionally, if `preSearch(...)` returns a `SearchProcessorInfo` with
an empty, non-`null` query (`""`), no search will be executed, resulting
in no search results or in the search results that has been added via
`postSearch(...)`.
@howlger howlger force-pushed the patch-searchProcessor branch from a202f0c to 1a7c801 Compare February 6, 2025 18:29
@howlger
Copy link
Contributor Author

howlger commented Feb 6, 2025

The test failure seems to be org.eclipse.ua.tests.doc.internal.linkchecker.LinkTest.testAllLinks -- Time elapsed: 15.53 s <<< FAILURE! (a timeout on Windows; on Linux it is fine; MacOS not yet finished) and unrelated to this change. Could the tests please be re-run?

@iloveeclipse
Copy link
Member

I've rerun Windows build, it is OK now. Thanks. Will try to reviewtomorrow.

Copy link
Member

@iloveeclipse iloveeclipse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

@iloveeclipse iloveeclipse merged commit 4a4172c into eclipse-platform:master Feb 7, 2025
16 of 17 checks passed
@howlger
Copy link
Contributor Author

howlger commented Feb 11, 2025

Thanks everyone for your feedback and for applying.

@iloveeclipse
Copy link
Member

You are welcome Holger.

@iloveeclipse iloveeclipse added this to the 4.35 M3 milestone Feb 19, 2025
akurtakov added a commit to akurtakov/eclipse.platform that referenced this pull request Apr 16, 2025
akurtakov added a commit that referenced this pull request Apr 16, 2025
Wrong with the initial contribution
#1725
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants