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 227800 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
[patch]
Reworked patch according to
Bug33710.patch (text/plain), 5.66 KB, created by
Marco Descher
on 2013-03-01 10:26:07 EST
(
hide
)
Description:
Reworked patch according to
Filename:
MIME Type:
Creator:
Marco Descher
Created:
2013-03-01 10:26:07 EST
Size:
5.66 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..a2165d0 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 >@@ -1,4 +1,4 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2012 IBM Corporation and others. >+ * Copyright (c) 2000, 2013 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 >@@ -11,4 +11,5 @@ > * o Search dialog not respecting activity enablement > * (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=45729) >+ * Marco Descher <marco@descher.at> - http://bugs.eclipse.org/33710 > *******************************************************************************/ > package org.eclipse.search.internal.ui; >@@ -52,4 +53,5 @@ > > import org.eclipse.jface.action.LegacyActionTools; >+import org.eclipse.jface.dialogs.DialogSettings; > import org.eclipse.jface.dialogs.IDialogConstants; > import org.eclipse.jface.dialogs.IDialogSettings; >@@ -91,4 +93,9 @@ > public class SearchDialog extends ExtendedDialogWindow implements ISearchPageContainer, IPageChangeProvider { > >+ // Dialog store id constants >+ private static final String DIALOG_NAME= "SearchDialog"; //$NON-NLS-1$ >+ private static final String STORE_PREVIOUS_PAGE= "PREVIOUS_PAGE"; //$NON-NLS-1$ >+ private static final String STORE_IS_OPEN_PREVIOUS_PAGE= "IS_OPEN_PREVIOUS_PAGE"; //$NON-NLS-1$ >+ > private class TabFolderLayout extends Layout { > protected Point computeSize(Composite composite, int wHint, int hHint, boolean flushCache) { >@@ -146,4 +153,5 @@ > private final String[] fCurrentEnclosingProject; > >+ private final IDialogSettings fDefaultDialogSettings= DialogSettings.getOrCreateSection(SearchPlugin.getDefault().getDialogSettings(), DIALOG_NAME); > > public SearchDialog(IWorkbenchWindow window, String pageId) { >@@ -155,4 +163,9 @@ > fDescriptors= filterByActivities(SearchPlugin.getDefault().getEnabledSearchPageDescriptors(pageId)); > fInitialPageId= pageId; >+ >+ if (fInitialPageId == null && fDefaultDialogSettings.getBoolean(STORE_IS_OPEN_PREVIOUS_PAGE)) { >+ fInitialPageId= fDefaultDialogSettings.get(STORE_PREVIOUS_PAGE); >+ } >+ > fPageChangeListeners= null; > setUseEmbeddedProgressMonitorPart(false); >@@ -329,4 +342,18 @@ > this.getButton(IDialogConstants.SELECT_ALL_ID).addSelectionListener(listener); > this.getButton(IDialogConstants.DESELECT_ALL_ID).addSelectionListener(listener); >+ } >+ >+ protected Control createDialogArea(Composite parent) { >+ Composite ret= (Composite)super.createDialogArea(parent); >+ >+ final Button lastUsedPageButton= new Button(ret, SWT.CHECK); >+ lastUsedPageButton.setText(SearchMessages.SearchPageSelectionDialog_rememberLastUsedPage_message); >+ lastUsedPageButton.setSelection(fDefaultDialogSettings.getBoolean(STORE_IS_OPEN_PREVIOUS_PAGE)); >+ lastUsedPageButton.addSelectionListener(new SelectionAdapter() { >+ public void widgetSelected(SelectionEvent e) { >+ fDefaultDialogSettings.put(STORE_IS_OPEN_PREVIOUS_PAGE, lastUsedPageButton.getSelection()); >+ } >+ }); >+ return ret; > } > }; >@@ -523,4 +550,6 @@ > SearchPageDescriptor descriptor= (SearchPageDescriptor) item.getData("descriptor"); //$NON-NLS-1$ > >+ fDefaultDialogSettings.put(STORE_PREVIOUS_PAGE, descriptor.getId()); >+ > if (item.getControl() == null) { > item.setControl(createPageControl(folder, descriptor)); >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 321145f..f4ad0da 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 >@@ -9,4 +9,5 @@ > * IBM Corporation - initial API and implementation > * Christian Walther (Indel AG) - Bug 399094: Add whole word option to file search >+ * Marco Descher <marco@descher.at> - http://bugs.eclipse.org/33710 > *******************************************************************************/ > package org.eclipse.search.internal.ui; >@@ -64,4 +65,5 @@ > public static String SearchPageSelectionDialog_title; > public static String SearchPageSelectionDialog_message; >+ public static String SearchPageSelectionDialog_rememberLastUsedPage_message; > public static String SearchManager_resourceChangedWarning; > public static String SearchManager_resourceChanged; >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 0e9f81d..88e2345 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 >@@ -9,4 +9,5 @@ > # IBM Corporation - initial API and implementation > # Christian Walther (Indel AG) - Bug 399094: Add whole word option to file search >+# Marco Descher <marco@descher.at> - http://bugs.eclipse.org/33710 > ############################################################################### > >@@ -194,4 +195,6 @@ > ExceptionDialog_seeErrorLogMessage= See error log for details > >+SearchPageSelectionDialog_rememberLastUsedPage_message=&Remember last used page >+ > SearchPreferencePage_emphasizePotentialMatches= &Emphasize potential matches > SearchPreferencePage_potentialMatchFgColor= &Foreground color for potential matches:
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