Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Keller2013-03-12 11:29:31 +0000
committerMarkus Keller2013-03-12 11:29:31 +0000
commit8eb5d915d6bdb101cbb3597425c9892ee08f3fab (patch)
treeea7e855b50d93208893e589ffbb25e9533cdf538
parent97b1cf4b6990936dca33ed932af778c661f5fd04 (diff)
downloadeclipse.platform.text-8eb5d915d6bdb101cbb3597425c9892ee08f3fab.tar.gz
eclipse.platform.text-8eb5d915d6bdb101cbb3597425c9892ee08f3fab.tar.xz
eclipse.platform.text-8eb5d915d6bdb101cbb3597425c9892ee08f3fab.zip
Bug 33710: Open Search dialog with previous page instead of using the current selection to detect the pageI20130312-1000I20130312-0800
- setting must only be saved when user closes Customize dialog with OK
-rw-r--r--org.eclipse.search/search/org/eclipse/search/internal/ui/SearchDialog.java19
1 files changed, 10 insertions, 9 deletions
diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchDialog.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchDialog.java
index d07c3e268a8..9c131267022 100644
--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchDialog.java
+++ b/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchDialog.java
@@ -327,6 +327,8 @@ public class SearchDialog extends ExtendedDialogWindow implements ISearchPageCon
String message= SearchMessages.SearchPageSelectionDialog_message;
ListSelectionDialog dialog= new ListSelectionDialog(getShell(), input, new ArrayContentProvider(), labelProvider, message) {
+ Button fLastUsedPageButton;
+
public void create() {
super.create();
final CheckboxTableViewer viewer= getViewer();
@@ -347,17 +349,16 @@ public class SearchDialog extends ExtendedDialogWindow implements ISearchPageCon
protected Control createDialogArea(Composite parent) {
Composite control= (Composite)super.createDialogArea(parent);
-
- final Button lastUsedPageButton= new Button(control, SWT.CHECK);
- lastUsedPageButton.setText(SearchMessages.SearchPageSelectionDialog_rememberLastUsedPage_message);
- lastUsedPageButton.setSelection(fDialogSettings.getBoolean(STORE_IS_OPEN_PREVIOUS_PAGE));
- lastUsedPageButton.addSelectionListener(new SelectionAdapter() {
- public void widgetSelected(SelectionEvent e) {
- fDialogSettings.put(STORE_IS_OPEN_PREVIOUS_PAGE, lastUsedPageButton.getSelection());
- }
- });
+ fLastUsedPageButton= new Button(control, SWT.CHECK);
+ fLastUsedPageButton.setText(SearchMessages.SearchPageSelectionDialog_rememberLastUsedPage_message);
+ fLastUsedPageButton.setSelection(fDialogSettings.getBoolean(STORE_IS_OPEN_PREVIOUS_PAGE));
return control;
}
+
+ protected void okPressed() {
+ fDialogSettings.put(STORE_IS_OPEN_PREVIOUS_PAGE, fLastUsedPageButton.getSelection());
+ super.okPressed();
+ }
};
dialog.setTitle(SearchMessages.SearchPageSelectionDialog_title);
dialog.setInitialSelections(SearchPlugin.getDefault().getEnabledSearchPageDescriptors(fInitialPageId).toArray());

Back to the top