mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-09-10 12:03:16 +02:00
Bug 538785 - Select Processes dialog should remember when resized
With this change, the Select Processes dialog will remember its new size if it was resized by the user. Change-Id: I27161ae5b5332db87cc9876aa23cf8fd8c751a80 Signed-off-by: Simeon Andreev <simeon.danailov.andreev@gmail.com>
This commit is contained in:
parent
6870f55fbb
commit
8a73297c10
1 changed files with 16 additions and 0 deletions
|
@ -13,9 +13,12 @@ package org.eclipse.cdt.dsf.gdb.internal.ui.launching;
|
|||
|
||||
import java.util.Arrays;
|
||||
|
||||
import org.eclipse.cdt.dsf.gdb.internal.ui.GdbUIPlugin;
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
import org.eclipse.core.runtime.Status;
|
||||
import org.eclipse.jface.dialogs.Dialog;
|
||||
import org.eclipse.jface.dialogs.IDialogConstants;
|
||||
import org.eclipse.jface.dialogs.IDialogSettings;
|
||||
import org.eclipse.jface.viewers.ILabelProvider;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
|
@ -36,9 +39,12 @@ import org.eclipse.ui.dialogs.TwoPaneElementSelector;
|
|||
*/
|
||||
public class ProcessPrompterDialog extends TwoPaneElementSelector {
|
||||
|
||||
private static final String DIALOG_SETTINGS_SECTION_ID = "processPrompterDialog"; //$NON-NLS-1$
|
||||
|
||||
public ProcessPrompterDialog(Shell parent, ILabelProvider elementRenderer,
|
||||
ILabelProvider qualifierRenderer) {
|
||||
super(parent, elementRenderer, qualifierRenderer);
|
||||
setDialogBoundsSettings(getDialogBoundsSettings(), Dialog.DIALOG_PERSISTSIZE);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -118,4 +124,14 @@ public class ProcessPrompterDialog extends TwoPaneElementSelector {
|
|||
|
||||
return super.validateCurrentSelection();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected IDialogSettings getDialogBoundsSettings() {
|
||||
IDialogSettings settings = GdbUIPlugin.getDefault().getDialogSettings();
|
||||
IDialogSettings section = settings.getSection(DIALOG_SETTINGS_SECTION_ID);
|
||||
if (section == null) {
|
||||
section = settings.addNewSection(DIALOG_SETTINGS_SECTION_ID);
|
||||
}
|
||||
return section;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue