Skip to content

Commit dceb45a

Browse files
committed
Relabel Project Explorer filter dialog OK as Apply, add search icon
Rename the OK button in the Filters and Customization dialog to "Apply" to better reflect that the action applies filter and content changes to the view. Add SWT.ICON_SEARCH to the filter pattern Text so the search icon is shown next to the existing cancel icon.
1 parent af78fcf commit dceb45a

4 files changed

Lines changed: 13 additions & 1 deletion

File tree

bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/CommonNavigatorMessages.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,9 @@ public class CommonNavigatorMessages extends NLS {
125125
/** */
126126
public static String CommonFilterSelectionDialog_Available_customization_;
127127

128+
/** */
129+
public static String CommonFilterSelectionDialog_Apply;
130+
128131
/** */
129132
public static String CommonSorterDescriptorManager_A_navigatorContent_extension_in_0_;
130133

bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/filters/CommonFilterSelectionDialog.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import java.util.List;
1818
import java.util.Set;
1919

20+
import org.eclipse.jface.dialogs.IDialogConstants;
2021
import org.eclipse.jface.dialogs.TrayDialog;
2122
import org.eclipse.jface.resource.ColorRegistry;
2223
import org.eclipse.jface.resource.JFaceResources;
@@ -98,6 +99,13 @@ public boolean isHelpAvailable() {
9899
return helpContext != null;
99100
}
100101

102+
@Override
103+
protected void createButtonsForButtonBar(Composite parent) {
104+
createButton(parent, IDialogConstants.OK_ID,
105+
CommonNavigatorMessages.CommonFilterSelectionDialog_Apply, true);
106+
createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
107+
}
108+
101109
@Override
102110
protected Control createDialogArea(Composite parent) {
103111

bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/filters/CommonFiltersTab.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ private void createControl() {
9595
}
9696

9797
private void createPatternFilterText(Composite composite) {
98-
filterText = new Text(composite, SWT.SINGLE | SWT.BORDER | SWT.SEARCH | SWT.ICON_CANCEL);
98+
filterText = new Text(composite, SWT.SINGLE | SWT.BORDER | SWT.SEARCH | SWT.ICON_SEARCH | SWT.ICON_CANCEL);
9999
GridData filterTextGridData = new GridData(GridData.FILL_HORIZONTAL);
100100
filterText.setLayoutData(filterTextGridData);
101101
filterText.setMessage(CommonNavigatorMessages.CommonFilterSelectionDialog_enter_name_of_filte_);

bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/messages.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#String externalization, key=value
1515
#Thu Feb 02 14:22:56 EST 2006
1616
CommonFilterSelectionDialog_Available_customization_=Filters and Customization
17+
CommonFilterSelectionDialog_Apply=Apply
1718
CommonSorterDescriptorManager_A_navigatorContent_extension_does_n_=A navigatorContent extension does not exist with id\: {0} in plugin {1}
1819

1920
Delete=Delete

0 commit comments

Comments
 (0)