Skip to content

Commit 579b936

Browse files
Maximilian WittmerHeikoKlare
authored andcommitted
Find/Replace Overlay: add help context to Overlay
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
1 parent 7ab381c commit 579b936

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

bundles/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/findandreplace/overlay/FindReplaceOverlay.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
import org.eclipse.ui.internal.findandreplace.SearchOptions;
6666
import org.eclipse.ui.internal.findandreplace.status.IFindReplaceStatus;
6767

68+
import org.eclipse.ui.texteditor.IAbstractTextEditorHelpContextIds;
6869
import org.eclipse.ui.texteditor.StatusTextEditor;
6970

7071
/**
@@ -414,6 +415,9 @@ private void bindListeners() {
414415

415416
@Override
416417
public Control createContents(Composite parent) {
418+
PlatformUI.getWorkbench().getHelpSystem().setHelp(getShell(),
419+
IAbstractTextEditorHelpContextIds.FIND_REPLACE_OVERLAY);
420+
417421
backgroundToUse = new Color(getShell().getDisplay(), new RGBA(0, 0, 0, 0));
418422
return createDialog(parent);
419423
}

bundles/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/IAbstractTextEditorHelpContextIds.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,15 @@ public interface IAbstractTextEditorHelpContextIds {
291291
*/
292292
String FIND_REPLACE_DIALOG= PREFIX + "find_replace_dialog_context"; //$NON-NLS-1$
293293

294+
/**
295+
* Help context id for the overlay which may be shown instead of the
296+
* find/replace dialog.
297+
* <code>"org.eclipse.ui.find_replace_overlay_context"</code>
298+
*
299+
* @since 3.17
300+
*/
301+
String FIND_REPLACE_OVERLAY = PREFIX + "find_replace_overlay_context"; //$NON-NLS-1$
302+
294303
/**
295304
* Help context id for the action.
296305
* Value: <code>"org.eclipse.ui.goto_last_edit_position_action_context"</code>

0 commit comments

Comments
 (0)