| author | Marc-Andre Laperle | 2012-04-27 01:16:42 (EDT) |
|---|---|---|
| committer | Marc-Andre Laperle | 2012-04-30 12:17:35 (EDT) |
| commit | 9ba6060632da13047dbd5763b0fe891a8768322b (patch) (side-by-side diff) | |
| tree | 4b75fac011144494231893a189952d9577227097 | |
| parent | 821918824e1be1fdc1f3f9c2923c616a531df755 (diff) | |
| download | org.eclipse.cdt-9ba6060632da13047dbd5763b0fe891a8768322b.zip org.eclipse.cdt-9ba6060632da13047dbd5763b0fe891a8768322b.tar.gz org.eclipse.cdt-9ba6060632da13047dbd5763b0fe891a8768322b.tar.bz2 | |
Bug 309112 - "Open Declaration" window doesn't remember own size
Change-Id: I4fb1ed4ab0035c79a98bb5c8b7d33c6b2c22de92
Reviewed-on: https://git.eclipse.org/r/5682
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
Reviewed-by: Marc-Andre Laperle <malaperle@omnialabs.net>
IP-Clean: Marc-Andre Laperle <malaperle@omnialabs.net>
Tested-by: Marc-Andre Laperle <malaperle@omnialabs.net>
| -rw-r--r-- | core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/OpenActionUtil.java | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/OpenActionUtil.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/OpenActionUtil.java index cf271af..fb7ee19 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/OpenActionUtil.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/OpenActionUtil.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2010 IBM Corporation and others. + * Copyright (c) 2000, 2012 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 * which accompanies this distribution, and is available at @@ -8,12 +8,14 @@ * Contributors: * IBM Corporation - initial API and implementation * Markus Schorn (Wind River Systems) + * Marc-Andre Laperle - Bug 309112 - Remember dialog bounds *******************************************************************************/ package org.eclipse.cdt.internal.ui.actions; import java.util.ArrayList; import java.util.List; +import org.eclipse.jface.dialogs.IDialogSettings; import org.eclipse.jface.viewers.ILabelProvider; import org.eclipse.jface.window.Window; import org.eclipse.swt.widgets.Shell; @@ -25,6 +27,7 @@ import org.eclipse.cdt.core.model.CModelException; import org.eclipse.cdt.core.model.ICElement; import org.eclipse.cdt.core.model.ISourceReference; import org.eclipse.cdt.ui.CElementLabelProvider; +import org.eclipse.cdt.ui.CUIPlugin; import org.eclipse.cdt.internal.ui.util.EditorUtility; import org.eclipse.cdt.internal.ui.viewsupport.CElementLabels; @@ -32,6 +35,8 @@ import org.eclipse.cdt.internal.ui.viewsupport.CUILabelProvider; public class OpenActionUtil { + private static final String DIALOG_SETTINGS_SECTION_NAME = CUIPlugin.PLUGIN_ID + ".OPEN_ACTION_SELECTION_DIALOG_SECTION"; //$NON-NLS-1$ + private OpenActionUtil() { // no instance. } @@ -103,7 +108,17 @@ public class OpenActionUtil { labelProvider= new CUILabelProvider(textFlags, imageFlags); } - ElementListSelectionDialog dialog= new ElementListSelectionDialog(shell, labelProvider); + ElementListSelectionDialog dialog= new ElementListSelectionDialog(shell, labelProvider) { + @Override + protected IDialogSettings getDialogBoundsSettings() { + IDialogSettings settings = CUIPlugin.getDefault().getDialogSettings(); + IDialogSettings section = settings.getSection(DIALOG_SETTINGS_SECTION_NAME); + if (section == null) { + section = settings.addNewSection(DIALOG_SETTINGS_SECTION_NAME); + } + return section; + } + }; dialog.setTitle(title); dialog.setMessage(message); dialog.setElements(elements); |

