Skip to content

Find/Replace overlay: encapsulate handling of search option changes#4183

Merged
HeikoKlare merged 1 commit into
eclipse-platform:masterfrom
HeikoKlare:findreplace-overlay-searchoptionaction
Jul 14, 2026
Merged

Find/Replace overlay: encapsulate handling of search option changes#4183
HeikoKlare merged 1 commit into
eclipse-platform:masterfrom
HeikoKlare:findreplace-overlay-searchoptionaction

Conversation

@HeikoKlare

Copy link
Copy Markdown
Contributor

The configuration and implementation of search option modifications in the find/replace overlay was scattered across the overlay implementation as well the implementation of logic and the specific UI (tool) items.

With this change, the state and execution handling of search option changes is further encapsulated in a specialization of the existing FindReplaceOverlayAction. The UI just listens to changes/executions of this action or the underlying models.
In addition, the builder for the tool items for changing the search options is enhanced to a fluent builder that does not implicitly require specific combinations of properties being set.

Contributes to #1912

@github-actions

github-actions Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Test Results

   855 files  +  285     855 suites  +285   51m 58s ⏱️ + 18m 16s
 8 116 tests ±    0   7 873 ✅ ±    0  243 💤 ±  0  0 ❌ ±0 
20 250 runs  +6 750  19 596 ✅ +6 507  654 💤 +243  0 ❌ ±0 

Results for commit 494d0bc. ± Comparison against base commit c4d7646.

♻️ This comment has been updated with latest results.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This pull request refactors the Find/Replace overlay’s search-option handling by encapsulating option toggling and related UI updates into a specialized action type, and by reshaping the tool-item builder API to make search-option bindings more explicit and fluent. This aligns with issue #1912’s goal of separating UI setup from controller-like logic.

Changes:

  • Introduces FindReplaceOverlaySearchOptionAction to encapsulate toggling of SearchOptions and enable UI code to listen to action executions.
  • Extends FindReplaceOverlayAction with execution listeners so the overlay can react (e.g., updating incremental search) after an action runs.
  • Reworks AccessibleToolItemBuilder into a fluent builder with specialized sub-builders for general actions vs. search-option actions (including inverted display).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
bundles/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/findandreplace/overlay/FindReplaceOverlaySearchOptionAction.java Adds a specialized overlay action for toggling a specific search option via the logic layer.
bundles/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/findandreplace/overlay/FindReplaceOverlayAction.java Adds execution-listener support to notify UI logic after actions run.
bundles/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/findandreplace/overlay/FindReplaceOverlay.java Updates overlay buttons to use the new search-option action and react via execution listeners.
bundles/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/findandreplace/overlay/AccessibleToolItemBuilder.java Refactors builder into fluent sub-builders, including automatic binding for search-option state/availability.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@HeikoKlare HeikoKlare force-pushed the findreplace-overlay-searchoptionaction branch from b38f5ef to 0244d91 Compare July 12, 2026 21:02
The configuration and implementation of search option modifications in
the find/replace overlay was scattered across the overlay implementation
as well the implementation of logic and the specific UI (tool) items.

With this change, the state and execution handling of search option
changes is further encapsulated in a specialization of the existing
FindReplaceOverlayAction. The UI just listens to changes/executions of
this action or the underlying models.
In addition, the builder for the tool items for changing the search
options is enhanced to a fluent builder that does not implicitly require
specific combinations of properties being set.

Contributes to
eclipse-platform#1912
@HeikoKlare HeikoKlare force-pushed the findreplace-overlay-searchoptionaction branch from 0244d91 to 494d0bc Compare July 14, 2026 10:47
@HeikoKlare HeikoKlare merged commit e642f04 into eclipse-platform:master Jul 14, 2026
18 checks passed
@HeikoKlare HeikoKlare deleted the findreplace-overlay-searchoptionaction branch July 14, 2026 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants