-
Notifications
You must be signed in to change notification settings - Fork 193
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
[Modern Find/Replace] Implemented Find-Replace Overlay #1192
[Modern Find/Replace] Implemented Find-Replace Overlay #1192
Conversation
Test Results 1 812 files 1 812 suites 1h 35m 0s ⏱️ For more details on these failures, see this check. Results for commit 3a2e413. ♻️ This comment has been updated with latest results. |
b5cd48f
to
659b102
Compare
Thank you for your feedback, @jukzi. In particular, 9) is related to this issue. |
Did we make any progress here? Would be a shame not to get this beautiful new UI into Eclipse. |
659b102
to
0455efe
Compare
0455efe
to
fae805d
Compare
fae805d
to
f975bc4
Compare
f975bc4
to
0e9bd7c
Compare
@Wittmaxi can you continue with this enhancement now that the refactoring is done? |
He is working on it, but it may still take some time due to limited time budget. We optimistically aim for a contribtion as soon as possible after 2024-03 freeze, so we have quite some time for evaluation in the development cycle for 2024-06.
|
0e9bd7c
to
948e57f
Compare
I expect at least one Test to fail: The FindReplaceDialog-Test currently cannot test the default behavior since the "new Overlay" is opened by default. If this persists after I correctly parametrise the new Overlay, I might have overlooked a problem while merging. |
4e2da58
to
6fb672b
Compare
@HeikoKlare @vogella very happy news! I could fix another final milestone: the Overlay now binds to the constraints of Console's when opened on one (not yet perfectly...): Here is a screenshot of the parameter used for selecting between Find/Replace-Methods: The Find/Replace-Overlay is off by default (for now). I have one doubt and need to check this: This is the relevant code: private void unbindListeners() {
if (targetPart != null && targetPart instanceof StatusTextEditor textEditor) {
Control targetWidget = textEditor.getSourceViewer().getTextWidget();
if (targetWidget != null) {
targetWidget.getShell().removeControlListener(shellMovementListener);
targetWidget.removePaintListener(widgetMovementListener);
targetPart.getSite().getPage().removePartListener(partListener);
}
}
if (targetPart != null && targetPart instanceof PageBookView consoleView) {
Control targetWidget = consoleView.getCurrentPage().getControl();
if (targetWidget != null) {
targetWidget.getShell().removeControlListener(shellMovementListener);
targetWidget.removePaintListener(widgetMovementListener);
targetPart.getSite().getPage().removePartListener(partListener);
}
}
}
private void bindListeners() {
if (targetPart instanceof StatusTextEditor textEditor) {
Control targetWidget = textEditor.getSourceViewer().getTextWidget();
targetWidget.getShell().addControlListener(shellMovementListener);
targetWidget.addPaintListener(widgetMovementListener);
targetPart.getSite().getPage().addPartListener(partListener);
}
if (targetPart != null && targetPart instanceof PageBookView consoleView) {
Control targetWidget = consoleView.getCurrentPage().getControl();
targetWidget.getShell().addControlListener(shellMovementListener);
targetWidget.addPaintListener(widgetMovementListener);
targetPart.getSite().getPage().addPartListener(partListener);
}
} |
dc416a8
to
8910b98
Compare
21f43d3
to
3a2e413
Compare
Rebased onto the next version bump. Fingers crossed again... |
@Wittmaxi org.eclipse.search.tests has test errors under Windows. Can you have a look? |
@vogella I didn't write or modify this test, it is not related to my PR and I am very confident that the fail isn't a side-effect of my pr. However, I could not find it in the issues - I have documented the random fail here: #1941 I cannot access my computer today, thank you for helping (finally!) merge this PR 😀 |
Thanks @Wittmaxi for documenting the failing test #1941 I merge this change now. Thanks for all your work @Wittmaxi and also thanks to @HeikoKlare and all others for reviewing this change very, very carefully. |
Tried this out yesterday for the first time and it's really nice. Can you please create a new and noteworthy for this new feature in https://github.com/eclipse-platform/www.eclipse.org-eclipse ? |
Add the images used in the editor overlay used to perform find/replace. The images are only added in svg-format whereas they are used in png-format in the Overlay. In particular, a few new images were created and/or adapted from www.iconbolt.com. This PR acommodates eclipse-platform/eclipse.platform.ui#1192
Add the images used in the editor overlay used to perform find/replace. The images are only added in svg-format whereas they are used in png-format in the Overlay. In particular, a few new images were created and/or adapted from www.iconbolt.com. This PR acommodates eclipse-platform/eclipse.platform.ui#1192
Add the images used in the editor overlay used to perform find/replace. The images are only added in svg-format whereas they are used in png-format in the Overlay. In particular, a few new images were created and/or adapted from www.iconbolt.com. This PR acommodates eclipse-platform/eclipse.platform.ui#1192
@Wittmaxi that message box looks somehow wrong. I guess it's the missing border and white bar at the bottom that makes it look ugly (win, Light default theme): |
For the record: reported issue is addressed via #2188 |
Not sure if this belongs here, or somewhere else. The big problem I have with the replacement of the find modal dialog is finding things in other editors. I note that a reason for the change is that it wasn't always clear what the find dialog was bound to find in, but I used that a lot. Maybe I'm one data point, but my anecdote of workflow of what I lost is that when working on two files at the same time side by side that are related, I will often highlight a method/variable/something I want to find in the other editor and hit ctrl-f. This opens the find dialog with the desired words already in the dialog. I then click in the other window and hit enter, and it finds it. Now I think I have to copy the text to the clip board, go to the other editor, ctrl-f, ctrl-v to try to find in the other window. I also actually find it awkward that there are two dialogs open, one for each window and that they can be finding multiple things? The more I think about it, the finding multiple things might be more useful than my workflow? I should try the new options more I guess. Maybe an actual suggestion would be an option for "find in visible editors" ? A second comment. Another reason posted for the change I see is that the find dialog could pop up over things and hide them. Yes, it could. And being a dialog, you can move it. And I moved it frequently. I can't move the overlay. If it's covering something up, I have fewer options for doing something about it. I don't know. I'm on the fence about it. I'm back to the old dialog for now. I haven't liked the removal of words from the windows right click dialog, and this feels like more of the same along that vein. |
Thank you for your feedback, @grendel151! You are absolutely right that the described workflow (searching for same/related things in different editors, side by side) is something that is far better supported with the existing dialog than (currently) with the overlay. On the contrary, the overlay better supports document-specific search settings. Obviously, none of the workflows is "better" than the other, only some people may face one of them more often than the other. Note that the overlay is not "finished" but still actively worked on, as in-document searching is an essential task during developing, so all relevant workflows should be supported in an efficient way. This is the according umbrella issue: There is also a specific issue covering the sharing search settings across multiple documents, which is highly related to your concern: So we definitely think about ways of providing better support for the described workflow, such as some explicit option to enable a "sharing mode" in which search settings are always propagated to all open editors. Feel free to also post your needs/ideas to those specific issues, so that we can properly address them. |
Chrome browser for example reuses the search field of another tab when openend in a new tab. |
Modern Find-Replace Overlay
newly introduced Overlay in dark theme
newly introduced Overlay on the bottom of the screen, used to perform a replace-operation.
at the top of the screen, with some search-options enabled
What are we addressing (copied from #1090)
The current solution opens a Modal on keypress Control + F - prompting a user to enter a string for finding
and optionally a string to replace the currently found string with.
The status quo also has multiple options for searching which are available by selecting
the appropriate checkbox.
Showcase
2023-10-05_11-21-40.mp4