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

Add Content assist to the Find/Replace overlay in RegEx Mode #2049

Merged
merged 1 commit into from
Jul 23, 2024

Conversation

Wittmaxi
Copy link

@Wittmaxi Wittmaxi commented Jul 6, 2024

27

Missing feature which exists in the Dialog but not (yet) in the overlay

@Wittmaxi Wittmaxi marked this pull request as draft July 6, 2024 12:19
Copy link
Contributor

github-actions bot commented Jul 6, 2024

Test Results

 1 815 files  ±0   1 815 suites  ±0   1h 33m 31s ⏱️ - 6m 52s
 7 682 tests ±0   7 454 ✅ ±0  228 💤 ±0  0 ❌ ±0 
24 207 runs  ±0  23 458 ✅ ±0  749 💤 ±0  0 ❌ ±0 

Results for commit 46aacfa. ± Comparison against base commit fd8ce3e.

♻️ This comment has been updated with latest results.

@Wittmaxi Wittmaxi force-pushed the MW-content-assist branch 2 times, most recently from 2ab2bf0 to 6aa63c3 Compare July 22, 2024 08:54
@Wittmaxi Wittmaxi marked this pull request as ready for review July 22, 2024 08:55
@Wittmaxi Wittmaxi requested a review from HeikoKlare July 22, 2024 08:55
Copy link
Contributor

@HeikoKlare HeikoKlare left a 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 and is a great enhancement for regex search in the find/replace overlay. There is just one functional problem: the enablement is only updated when activating/reactivating the regex option, but this only affects the replace bar if it is open at that point in time. Thus, when opening the replace bar, content assist will always be enabled, because it's enablement is not initialized.

In the following screenshot, I have just opened the overlay and then opened the replace bar. Even though the regex option is disabled, content assist is activated for the replace input field:
image

@@ -360,7 +365,8 @@ public int open() {

getShell().layout();
updatePlacementAndVisibility();

updateContentAssistAvailability();
searchBar.forceFocus();
Copy link
Contributor

Choose a reason for hiding this comment

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

Duplicate forceFocus() should not be necessary in the open() method.

Adds a content assist feature when the Overlay is in RegEx mode.
Uses the same content proposals as the find/replace dialog.
@HeikoKlare HeikoKlare merged commit 8b4c0b6 into eclipse-platform:master Jul 23, 2024
16 checks passed
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