Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properly use selected string for replacements in FindReplaceDialog #1754 #1765

Merged
merged 1 commit into from
Mar 23, 2024

Conversation

HeikoKlare
Copy link
Contributor

When opening the FindReplaceDialog with an active selection in a text viewer, the input field for the find string is filled with the content of that selection. In addition, the replace functionality of the dialog is activated. Currently, using the replace functionality does not work because it requires a find operation to be executed before, which is currently not done.

With this change, initializing the dialog with the current selection performs the missing find operation before executing a replace operation. The according functionality is refactored and a regression test is added.

Fixes #1754

@HeikoKlare
Copy link
Contributor Author

@Wittmaxi Can you have a look at this please?

Copy link
Contributor

github-actions bot commented Mar 19, 2024

Test Results

   918 files  ±0     918 suites  ±0   1h 11m 59s ⏱️ + 25m 18s
 7 509 tests +1   7 358 ✅ +3  151 💤 ±0  0 ❌  - 2 
23 676 runs  +3  23 171 ✅ +5  505 💤 ±0  0 ❌  - 2 

Results for commit f59d882. ± Comparison against base commit e983db8.

♻️ This comment has been updated with latest results.

Copy link
Contributor

@Wittmaxi Wittmaxi left a comment

Choose a reason for hiding this comment

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

I believe these changements make sense. I have a few questions left, but would not mind these changes being merged.

@HeikoKlare HeikoKlare marked this pull request as ready for review March 21, 2024 15:23
…lipse-platform#1754

When opening the FindReplaceDialog with an active selection in a text
viewer, the input field for the find string is filled with the content
of that selection. In addition, the replace functionality of the dialog
is activated. Currently, using the replace functionality does not work
because it requires a find operation to be executed before, which is
currently not done.

With this change, initializing the dialog with the current selection
performs the missing find operation before executing a replace
operation. The according functionality is refactored and a regression
test is added.

Fixes eclipse-platform#1754
@HeikoKlare
Copy link
Contributor Author

Thanks for checking the changes, @Wittmaxi! I have incorporated your improvement proposals.

@HeikoKlare HeikoKlare merged commit c40b7a1 into eclipse-platform:master Mar 23, 2024
16 checks passed
@HeikoKlare HeikoKlare deleted the issue-1754 branch March 23, 2024 17:57
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.

2024-03: "Find/Replace"-Button has no effect anymore without manually shifting focus back to the editor
2 participants