|
Lines 12-13
Link Here
|
| 12 |
* (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=45729) |
12 |
* (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=45729) |
|
|
13 |
* Marco Descher <marco@descher.at> - http://bugs.eclipse.org/33710 |
| 13 |
*******************************************************************************/ |
14 |
*******************************************************************************/ |
|
Lines 53-54
Link Here
|
| 53 |
import org.eclipse.jface.action.LegacyActionTools; |
54 |
import org.eclipse.jface.action.LegacyActionTools; |
|
|
55 |
import org.eclipse.jface.dialogs.DialogSettings; |
| 54 |
import org.eclipse.jface.dialogs.IDialogConstants; |
56 |
import org.eclipse.jface.dialogs.IDialogConstants; |
|
Lines 91-92
Link Here
|
| 91 |
public class SearchDialog extends ExtendedDialogWindow implements ISearchPageContainer, IPageChangeProvider { |
93 |
public class SearchDialog extends ExtendedDialogWindow implements ISearchPageContainer, IPageChangeProvider { |
|
|
94 |
|
| 95 |
/** |
| 96 |
* The id of the last search page that was opened in the search dialog, used as key in |
| 97 |
* {@link DialogSettings} |
| 98 |
*/ |
| 99 |
public static final String PREVIOUS_SEARCH_PAGE= "PreviousSearchPageId_SearchDialog"; //$NON-NLS-1$ |
| 100 |
|
| 101 |
/** |
| 102 |
* Whether to remember the previous search page, used as key in {@link DialogSettings} |
| 103 |
*/ |
| 104 |
public static final String REMEMBER_PREVIOUS_SEARCH_PAGE= "RememberPreviousSearchPage_SearchDialog"; //$NON-NLS-1$ |
| 92 |
|
105 |
|
|
Lines 147-148
Link Here
|
| 147 |
|
160 |
|
|
|
161 |
private final IDialogSettings defaultDialogSettings= SearchPlugin.getDefault().getDialogSettings(); |
| 148 |
|
162 |
|
|
Lines 156-157
Link Here
|
| 156 |
fInitialPageId= pageId; |
170 |
fInitialPageId= pageId; |
|
|
171 |
|
| 172 |
if (fInitialPageId == null && defaultDialogSettings.getBoolean(REMEMBER_PREVIOUS_SEARCH_PAGE)) { |
| 173 |
fInitialPageId= defaultDialogSettings.get(PREVIOUS_SEARCH_PAGE); |
| 174 |
} |
| 175 |
|
| 157 |
fPageChangeListeners= null; |
176 |
fPageChangeListeners= null; |
|
Lines 330-331
Link Here
|
| 330 |
this.getButton(IDialogConstants.DESELECT_ALL_ID).addSelectionListener(listener); |
349 |
this.getButton(IDialogConstants.DESELECT_ALL_ID).addSelectionListener(listener); |
|
|
350 |
} |
| 351 |
|
| 352 |
protected Control createDialogArea(Composite parent) { |
| 353 |
Composite ret= (Composite)super.createDialogArea(parent); |
| 354 |
final Button b= new Button(ret, SWT.CHECK); |
| 355 |
b.setText(SearchMessages.RememberSelectedSearchTab_message); |
| 356 |
b.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); |
| 357 |
b.setSelection(defaultDialogSettings.getBoolean(REMEMBER_PREVIOUS_SEARCH_PAGE)); |
| 358 |
b.addSelectionListener(new SelectionAdapter() { |
| 359 |
public void widgetSelected(SelectionEvent e) { |
| 360 |
defaultDialogSettings.put(REMEMBER_PREVIOUS_SEARCH_PAGE, ((Button)e.widget).getSelection()); |
| 361 |
} |
| 362 |
}); |
| 363 |
return ret; |
| 331 |
} |
364 |
} |
|
Lines 524-525
Link Here
|
| 524 |
|
557 |
|
|
|
558 |
if (defaultDialogSettings.getBoolean(REMEMBER_PREVIOUS_SEARCH_PAGE)) |
| 559 |
defaultDialogSettings.put(PREVIOUS_SEARCH_PAGE, descriptor.getId()); |
| 560 |
|
| 525 |
if (item.getControl() == null) { |
561 |
if (item.getControl() == null) { |