Skip to content

Commit

Permalink
Find/Replace Overlay: add help context to Overlay
Browse files Browse the repository at this point in the history
Add the find/replace help context to the overlay which was also used for
the find/replace dialog. In particular, display help for find/replace
with regex patterns.

fixes #1994
  • Loading branch information
Maximilian Wittmer authored and HeikoKlare committed Jul 9, 2024
1 parent 21f5812 commit 65de8cf
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
import org.eclipse.ui.internal.findandreplace.SearchOptions;
import org.eclipse.ui.internal.findandreplace.status.IFindReplaceStatus;

import org.eclipse.ui.texteditor.IAbstractTextEditorHelpContextIds;
import org.eclipse.ui.texteditor.StatusTextEditor;

/**
Expand Down Expand Up @@ -414,6 +415,9 @@ private void bindListeners() {

@Override
public Control createContents(Composite parent) {
PlatformUI.getWorkbench().getHelpSystem().setHelp(getShell(),
IAbstractTextEditorHelpContextIds.FIND_REPLACE_OVERLAY);

backgroundToUse = new Color(getShell().getDisplay(), new RGBA(0, 0, 0, 0));
return createDialog(parent);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,15 @@ public interface IAbstractTextEditorHelpContextIds {
*/
String FIND_REPLACE_DIALOG= PREFIX + "find_replace_dialog_context"; //$NON-NLS-1$

/**
* Help context id for the overlay which may be shown instead of the
* find/replace dialog.
* <code>"org.eclipse.ui.find_replace_overlay_context"</code>
*
* @since 3.17
*/
String FIND_REPLACE_OVERLAY = PREFIX + "find_replace_overlay_context"; //$NON-NLS-1$

/**
* Help context id for the action.
* Value: <code>"org.eclipse.ui.goto_last_edit_position_action_context"</code>
Expand Down

0 comments on commit 65de8cf

Please sign in to comment.