Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 225249 Details for
Bug 33710
Open Search dialog with previous page instead of using the current selection to detect the page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Proposed solution for the bug
Bug33710.patch (text/plain), 3.67 KB, created by
Marco Descher
on 2013-01-05 16:07:13 EST
(
hide
)
Description:
Proposed solution for the bug
Filename:
MIME Type:
Creator:
Marco Descher
Created:
2013-01-05 16:07:13 EST
Size:
3.67 KB
patch
obsolete
>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 b998cbb..7c52ed9 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 >@@ -12,2 +12,3 @@ > * (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=45729) >+ * Marco Descher <marco@descher.at> - http://bugs.eclipse.org/33710 > *******************************************************************************/ >@@ -53,2 +54,3 @@ > import org.eclipse.jface.action.LegacyActionTools; >+import org.eclipse.jface.dialogs.DialogSettings; > import org.eclipse.jface.dialogs.IDialogConstants; >@@ -91,2 +93,13 @@ > public class SearchDialog extends ExtendedDialogWindow implements ISearchPageContainer, IPageChangeProvider { >+ >+ /** >+ * The id of the last search page that was opened in the search dialog, used as key in >+ * {@link DialogSettings} >+ */ >+ public static final String PREVIOUS_SEARCH_PAGE= "PreviousSearchPageId_SearchDialog"; //$NON-NLS-1$ >+ >+ /** >+ * Whether to remember the previous search page, used as key in {@link DialogSettings} >+ */ >+ public static final String REMEMBER_PREVIOUS_SEARCH_PAGE= "RememberPreviousSearchPage_SearchDialog"; //$NON-NLS-1$ > >@@ -147,2 +160,3 @@ > >+ private final IDialogSettings defaultDialogSettings= SearchPlugin.getDefault().getDialogSettings(); > >@@ -156,2 +170,7 @@ > fInitialPageId= pageId; >+ >+ if (fInitialPageId == null && defaultDialogSettings.getBoolean(REMEMBER_PREVIOUS_SEARCH_PAGE)) { >+ fInitialPageId= defaultDialogSettings.get(PREVIOUS_SEARCH_PAGE); >+ } >+ > fPageChangeListeners= null; >@@ -330,2 +349,16 @@ > this.getButton(IDialogConstants.DESELECT_ALL_ID).addSelectionListener(listener); >+ } >+ >+ protected Control createDialogArea(Composite parent) { >+ Composite ret= (Composite)super.createDialogArea(parent); >+ final Button b= new Button(ret, SWT.CHECK); >+ b.setText(SearchMessages.RememberSelectedSearchTab_message); >+ b.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); >+ b.setSelection(defaultDialogSettings.getBoolean(REMEMBER_PREVIOUS_SEARCH_PAGE)); >+ b.addSelectionListener(new SelectionAdapter() { >+ public void widgetSelected(SelectionEvent e) { >+ defaultDialogSettings.put(REMEMBER_PREVIOUS_SEARCH_PAGE, ((Button)e.widget).getSelection()); >+ } >+ }); >+ return ret; > } >@@ -524,2 +557,5 @@ > >+ if (defaultDialogSettings.getBoolean(REMEMBER_PREVIOUS_SEARCH_PAGE)) >+ defaultDialogSettings.put(PREVIOUS_SEARCH_PAGE, descriptor.getId()); >+ > if (item.getControl() == null) { >diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchMessages.java b/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchMessages.java >index 2478aa4..24e1b62 100644 >--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchMessages.java >+++ b/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchMessages.java >@@ -56,3 +56,4 @@ > public static String ReplaceRefactoring_result_update_name; >- >+ public static String RememberSelectedSearchTab_message; >+ > public static String SearchDialog_title; >diff --git a/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchMessages.properties b/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchMessages.properties >index 2eac4b5..e6e80a1 100644 >--- a/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchMessages.properties >+++ b/org.eclipse.search/search/org/eclipse/search/internal/ui/SearchMessages.properties >@@ -202,2 +202,4 @@ > >+RememberSelectedSearchTab_message=Remember selected search tab >+ > ReplaceAction_label_all= Re&place All...
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
daniel_megert
:
review-
Actions:
View
|
Diff
Attachments on
bug 33710
:
199804
|
199965
|
199966
|
225249
|
225250
|
225310
|
225311
|
227716
|
227721
|
227800