-
Notifications
You must be signed in to change notification settings - Fork 228
Quick search fix #2541
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
Quick search fix #2541
Conversation
|
This pull request changes some projects for the first time in this development cycle. An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch. Git patchFurther information are available in Common Build Issues - Missing version increments. |
b79d8df to
811b39d
Compare
bb06744 to
cfebba0
Compare
b45939b to
bd6c3f7
Compare
ec72ad4 to
0b07e25
Compare
47d5efe to
1fd490f
Compare
HannesWell
left a comment
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.
Thank you for this PR.
I'm not very familiar with this part of the code and therefore just did a 'code-style' review. Please see my remarks below.
@Wittmaxi or @HeikoKlare do you plan to do a 'functional' review? If not I can have a look too.
bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/DialogSettings.java
Outdated
Show resolved
Hide resolved
bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/DialogSettings.java
Outdated
Show resolved
Hide resolved
...eclipse.text.quicksearch/src/org/eclipse/text/quicksearch/internal/ui/QuickSearchDialog.java
Outdated
Show resolved
Hide resolved
...eclipse.text.quicksearch/src/org/eclipse/text/quicksearch/internal/ui/QuickSearchDialog.java
Outdated
Show resolved
Hide resolved
bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/DialogSettings.java
Outdated
Show resolved
Hide resolved
ac14b93 to
8ea099c
Compare
fedejeanne
left a comment
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.
I wouldn't add the empty element to the history. It should be active if it was the last one in use but I wouldn't put it in the list since one can always easily recreate the "empty" by deleting the content:
I also have some comment regarding the names of the new field and constant in DialogSettings and the spacing.
bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/DialogSettings.java
Outdated
Show resolved
Hide resolved
c9772f2 to
77f5171
Compare
bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/DialogSettings.java
Outdated
Show resolved
Hide resolved
bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/DialogSettings.java
Outdated
Show resolved
Hide resolved
fa0b3bb to
0a0a010
Compare
...eclipse.text.quicksearch/src/org/eclipse/text/quicksearch/internal/ui/QuickSearchDialog.java
Outdated
Show resolved
Hide resolved
bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/DialogSettings.java
Outdated
Show resolved
Hide resolved
bb59c93 to
50bc99d
Compare
0cfa7c9 to
104d3e3
Compare
fedejeanne
left a comment
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.
I tested it and it works as expected. I took the liberty of doing the following changes though, I thought it would be faster than reviewing again:
- Removed unused constant
- Inlined method
getLastSearches() - Removed some unnecessary variables in methods
- Made the field
filterHistoryfinaland non-static - Stored/retrieved the lasat searches (
filterHistory) from the settings to allow the user to reuse the history even across restarts - Other small cosmetic changes (moved lines around)
I will merge this PR as soon as the tests are finished. @jannisCode please don't do any more changes.
|
@HannesWell may I drop your request for changes? |
|
The test failure on Mac is unrelated: #294 The other 2 failures are confusing though, they are very similar but one fails for the plugin LinuxWindowsI'm triggering the builds again. |
Fixes eclipse-platform#2329 Co-authored-by: Federico Jeanne <[email protected]>
104d3e3 to
c71a9ed
Compare
HannesWell
left a comment
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.
@HannesWell may I drop your request for changes?
Yes, I dropped it. Thanks for the heads up.
I just a have another suggestion, but not crucial.
| String filter = filterHistory.getFirst(); | ||
|
|
||
| // Filter out blanks | ||
| filterHistory.removeIf(String::isBlank); | ||
|
|
||
| searchIn.setItems(filterHistory.toArray(String[]::new)); |
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.
Nitpick: I don't think we need a comment to explain the next line
| String filter = filterHistory.getFirst(); | |
| // Filter out blanks | |
| filterHistory.removeIf(String::isBlank); | |
| searchIn.setItems(filterHistory.toArray(String[]::new)); | |
| String filter = filterHistory.getFirst(); | |
| filterHistory.removeIf(String::isBlank); | |
| searchIn.setItems(filterHistory.toArray(String[]::new)); |
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.
I'd normally agree but seeing that the builds are so brittle, I'd like to leave it as it is.
|
This PR caused a NPE on first open: |

This PR adresses the issue posed here: #2329