-
Notifications
You must be signed in to change notification settings - Fork 198
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
Incremental Search: extract logic for disabling on RegEx-Search #1791 #1805
Incremental Search: extract logic for disabling on RegEx-Search #1791 #1805
Conversation
Test Results 921 files 921 suites 46m 9s ⏱️ Results for commit 9b783e9. ♻️ This comment has been updated with latest results. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general, this looks good. I have two minor comments.
...ch.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/FindReplaceDialogTest.java
Outdated
Show resolved
Hide resolved
...se.ui.workbench.texteditor/src/org/eclipse/ui/internal/findandreplace/IFindReplaceLogic.java
Outdated
Show resolved
Hide resolved
And could you please also adapt the commit message, just like for the "whole words" options? (see #1791 (comment)) |
c14ae90
to
d654b06
Compare
@HeikoKlare Addressed in d654b06 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor improvement in a test name desired
...ch.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/FindReplaceDialogTest.java
Outdated
Show resolved
Hide resolved
d654b06
to
859fef9
Compare
859fef9
to
df357ae
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current state produces a regression, as the dialog can loose its "incremental" option when reopened. To reproduce, activate the "incremental" option, activate and deactive the "regex" option, then close and re-open the dialog. The "incremental" option is unselected but it selection should be recovered from the previous session of the dialog.
This is because the change misses an update of the functionality in FindReplaceDialog.setupFindReplaceLogic()
, which still bases the activation of the "incremental" option on its selection and its enablement. The latter has to be removed, just like for the "whole word" option.
Lines 1267 to 1268 in 781d89e
activateInFindReplaceLogicIf(SearchOptions.INCREMENTAL, | |
fIncrementalCheckBox.getEnabled() && fIncrementalCheckBox.getSelection()); |
Now that you mention it, I'm pretty sure one can find some other weird behaviors when playing with "Incremental", "Whole words" and "Regular expressions" and closing + reopening the search dialog :-o |
Can you elaborate on that? Is there something specific you have in mind and is that a general negative expectation or related to this PR? |
Sorry for being unclear. I wasn't talking about this PR :-) |
df357ae
to
7568c1b
Compare
@HeikoKlare I have addressed your comment and added a Unit-Test which checks the behavior for "re-opening" the dialog. |
Windows Random Failing documented here: #1807 |
...ch.texteditor.tests/src/org/eclipse/ui/workbench/texteditor/tests/FindReplaceDialogTest.java
Outdated
Show resolved
Hide resolved
7568c1b
to
a767ca3
Compare
7ec1114
to
679b224
Compare
when "incremental search" is selected and "RegEx-Search" is as well, the dialog/overlay will disable the option for "whole words". This PR extracts that functionality into the Find/Replace-Logic. Extracted from a Review-Comment in eclipse-platform#1791
679b224
to
9b783e9
Compare
Failing checks because of new issues are only because of an outdated reference build. Recent master build reports the same new issues: https://ci.eclipse.org/platform/job/eclipse.platform.ui/job/master/422 |
when "incremental search" is selected and "RegEx-Search" is as well, the dialog/overlay will disable the option for "whole words". This PR extracts that functionality into the Find/Replace-Logic.
Extracted from a Review-Comment in #1791