Commit 0e6e1b6
Find/replace: add test for whole-word availability with inactive regex support
Whole-word search and regex mode are mutually exclusive when regex is
effectively active. However, activating regex mode on a target that does
not support regex has no effective impact -- the option is activated but
not available, so it must not restrict other options like whole-word search.
This is already the correct behavior: the availability check for whole-word
uses isAvailableAndActive(REGEX), which requires both availability and
activation, so merely activating regex on a non-capable target leaves
whole-word unaffected.
A test is added to explicitly document and protect this invariant.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent f66c97d commit 0e6e1b6
1 file changed
Lines changed: 13 additions & 0 deletions
File tree
- tests/org.eclipse.ui.workbench.texteditor.tests/src/org/eclipse/ui/internal/findandreplace
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
719 | 719 | | |
720 | 720 | | |
721 | 721 | | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
722 | 735 | | |
723 | 736 | | |
724 | 737 | | |
| |||
0 commit comments