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 227721 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]
Formatting corrected version
Bug33710.patch (text/plain), 5.87 KB, created by
Marco Descher
on 2013-02-28 07:16:48 EST
(
hide
)
Description:
Formatting corrected version
Filename:
MIME Type:
Creator:
Marco Descher
Created:
2013-02-28 07:16:48 EST
Size:
5.87 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..9a86259 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; >@@ -91,4 +92,12 @@ > 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 IDialogSettings} >+ */ >+ public static final String PREVIOUS_SEARCH_PAGE= "PreviousSearchPageId_SearchDialog"; //$NON-NLS-1$ >+ >+ public static final String SEARCH_TAB_OPENS_LAST_USED_PAGE= "SearchTabSelectionMode_LastUsedPage"; //$NON-NLS-1$ >+ > private class TabFolderLayout extends Layout { > protected Point computeSize(Composite composite, int wHint, int hHint, boolean flushCache) { >@@ -146,4 +155,5 @@ > private final String[] fCurrentEnclosingProject; > >+ private final IDialogSettings defaultDialogSettings= SearchPlugin.getDefault().getDialogSettings(); > > public SearchDialog(IWorkbenchWindow window, String pageId) { >@@ -155,4 +165,10 @@ > fDescriptors= filterByActivities(SearchPlugin.getDefault().getEnabledSearchPageDescriptors(pageId)); > fInitialPageId= pageId; >+ >+ if (fInitialPageId == null) { >+ if (defaultDialogSettings.getBoolean(SEARCH_TAB_OPENS_LAST_USED_PAGE)) >+ fInitialPageId= defaultDialogSettings.get(PREVIOUS_SEARCH_PAGE); >+ } >+ > fPageChangeListeners= null; > setUseEmbeddedProgressMonitorPart(false); >@@ -329,4 +345,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 b= new Button(ret, SWT.CHECK); >+ b.setText(SearchMessages.RememberLastUsedPage_message); >+ b.setSelection(defaultDialogSettings.getBoolean(SEARCH_TAB_OPENS_LAST_USED_PAGE)); >+ b.addSelectionListener(new SelectionAdapter() { >+ public void widgetSelected(SelectionEvent e) { >+ defaultDialogSettings.put(SEARCH_TAB_OPENS_LAST_USED_PAGE, b.getSelection()); >+ } >+ }); >+ return ret; > } > }; >@@ -523,4 +553,6 @@ > SearchPageDescriptor descriptor= (SearchPageDescriptor) item.getData("descriptor"); //$NON-NLS-1$ > >+ defaultDialogSettings.put(PREVIOUS_SEARCH_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 2478aa4..335cd65 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 >@@ -1,4 +1,4 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2008 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 >@@ -8,4 +8,5 @@ > * Contributors: > * IBM Corporation - initial API and implementation >+ * Marco Descher <marco@descher.at> - http://bugs.eclipse.org/33710 > *******************************************************************************/ > package org.eclipse.search.internal.ui; >@@ -186,4 +187,5 @@ > public static String SearchPreferencePage_defaultPerspective_none; > public static String SearchPreferencePage_ignorePotentialMatches; >+ public static String RememberLastUsedPage_message; > public static String ReplaceAction_label_all; > public static String ReplaceAction_label_selected; >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..f34e757 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 >@@ -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 >@@ -8,4 +8,5 @@ > # Contributors: > # IBM Corporation - initial API and implementation >+# Marco Descher <marco@descher.at> - http://bugs.eclipse.org/33710 > ############################################################################### > >@@ -192,4 +193,6 @@ > ExceptionDialog_seeErrorLogMessage= See error log for details > >+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
Actions:
View
|
Diff
Attachments on
bug 33710
:
199804
|
199965
|
199966
|
225249
|
225250
|
225310
|
225311
|
227716
| 227721 |
227800