diff --git a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/dialogs/FilteredPreferenceDialog.java b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/dialogs/FilteredPreferenceDialog.java index 9c281e7d07d..febcc4eebe3 100644 --- a/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/dialogs/FilteredPreferenceDialog.java +++ b/bundles/org.eclipse.ui.workbench/eclipseui/org/eclipse/ui/internal/dialogs/FilteredPreferenceDialog.java @@ -126,8 +126,12 @@ protected Text doCreateFilterText(Composite parent) { @Override public void setInitialText(String text) { + // Track initialText for the empty-filter check and accessible name, and show it + // as the field's placeholder hint. Unlike the base implementation we never write + // it into the field, so addFilter() cannot turn the hint into an active pattern. + initialText = text != null ? text : ""; //$NON-NLS-1$ if (filterText != null && !filterText.isDisposed()) { - filterText.setMessage(text != null ? text : ""); //$NON-NLS-1$ + filterText.setMessage(initialText); } } @@ -140,7 +144,8 @@ protected void addFilter(ViewerFilter filter) { getViewer().addFilter(filter); if (filterText != null) { - setFilterText(WorkbenchMessages.FilteredTree_FilterMessage); + // Keep the field empty so the viewer filter narrows the pages; the + // hint text would otherwise be applied as a pattern and hide all pages. textChanged(); }