The history feature of the find/replace UI lacks test coverage in two
distinct areas:
HistoryStore (unit tests): HistoryStoreTest covers the storage class in
isolation — ordering (newest-first), deduplication, size-limit
enforcement, remove semantics, persistence across instances sharing the
same IDialogSettings, and independence of separate sections. Unit tests
are necessary here because the class carries non-trivial logic (e.g. the
in-place deduplication loop in write()) that should be verified without
spinning up the Eclipse workbench, and because failures in this layer
would otherwise only surface as hard-to-diagnose UI test failures.
Find/replace UI (integration tests): five new tests in FindReplaceUITest
verify that history is correctly populated after search, replace-all,
and
single replace, and that entries are ordered newest-first with
duplicates
suppressed. Running them in the common superclass ensures both the
overlay
and the dialog are covered. IFindReplaceUIAccess gains
selectFindHistoryEntry(int)
to abstract over the two different navigation mechanisms (ARROW_DOWN in
the overlay text field, combo selection in the dialog). Two additional
tests remain in FindReplaceOverlayTest to cover the overlay-specific
forward and backward search buttons, which have no dialog counterpart.
Fixes https://github.com/eclipse-platform/eclipse.platform.ui/issues/2100