Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,8 @@ private void createCloseTools() {
// Also close on Ctrl+F: otherwise it would reopen (a duplicate of) this very overlay.
commandSupport.registerAction(
new FindReplaceOverlayAction(this::close, IWorkbenchCommandConstants.EDIT_FIND_AND_REPLACE));
commandSupport.registerAction(new FindReplaceOverlayAction(this::triggerContentAssist,
ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS));

// Close button
new AccessibleToolItemBuilder(closeTools).withStyleBits(SWT.PUSH)
Expand Down Expand Up @@ -976,6 +978,14 @@ private void updateContentAssistAvailability() {
setContentAssistsEnablement(findReplaceLogic.isAvailableAndActive(SearchOptions.REGEX));
}

private void triggerContentAssist() {
if (searchBar.isFocusControl() && contentAssistSearchField.isEnabled()) {
contentAssistSearchField.openProposalPopup();
} else if (okayToUse(replaceBar) && replaceBar.isFocusControl() && contentAssistReplaceField.isEnabled()) {
contentAssistReplaceField.openProposalPopup();
}
}

private void decorate() {
if (findReplaceLogic.isAvailableAndActive(SearchOptions.REGEX)) {
SearchDecoration.validateRegex(getFindString(), searchBarDecoration);
Expand Down
Loading