From 7bcef26f6558aedb6751446f57294505ca8db1ce Mon Sep 17 00:00:00 2001 From: Jonah Graham Date: Mon, 16 Jan 2023 14:12:59 -0500 Subject: [PATCH] Make Select Configurations Dialog resizable Fixes #240 --- core/org.eclipse.cdt.ui/META-INF/MANIFEST.MF | 2 +- .../cdt/ui/newui/ConfigMultiSelectionDialog.java | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/core/org.eclipse.cdt.ui/META-INF/MANIFEST.MF b/core/org.eclipse.cdt.ui/META-INF/MANIFEST.MF index 020b63a6836..82a8c71cdbf 100644 --- a/core/org.eclipse.cdt.ui/META-INF/MANIFEST.MF +++ b/core/org.eclipse.cdt.ui/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.cdt.ui; singleton:=true -Bundle-Version: 8.0.0.qualifier +Bundle-Version: 8.0.100.qualifier Bundle-Activator: org.eclipse.cdt.ui.CUIPlugin Bundle-Vendor: %providerName Bundle-Localization: plugin diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/ConfigMultiSelectionDialog.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/ConfigMultiSelectionDialog.java index 354226f82f3..ba4a1a99264 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/ConfigMultiSelectionDialog.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/ConfigMultiSelectionDialog.java @@ -18,6 +18,8 @@ import org.eclipse.cdt.internal.ui.newui.Messages; import org.eclipse.cdt.ui.CUIPlugin; import org.eclipse.jface.dialogs.Dialog; import org.eclipse.jface.dialogs.IDialogConstants; +import org.eclipse.jface.layout.GridDataFactory; +import org.eclipse.jface.layout.GridLayoutFactory; import org.eclipse.jface.viewers.CheckStateChangedEvent; import org.eclipse.jface.viewers.CheckboxTableViewer; import org.eclipse.jface.viewers.ICheckStateListener; @@ -28,7 +30,6 @@ import org.eclipse.jface.viewers.Viewer; import org.eclipse.swt.SWT; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; @@ -63,6 +64,11 @@ public class ConfigMultiSelectionDialog extends Dialog { super(parentShell); } + @Override + protected boolean isResizable() { + return true; + } + @Override protected void configureShell(Shell shell) { super.configureShell(shell); @@ -87,13 +93,13 @@ public class ConfigMultiSelectionDialog extends Dialog { protected Control createDialogArea(Composite parent) { Composite composite = new Composite(parent, SWT.NULL); composite.setFont(parent.getFont()); - composite.setLayout(new GridLayout(1, true)); - composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); + composite.setLayout(GridLayoutFactory.fillDefaults().margins(5, 5).create()); + composite.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create()); // Create the current config table table = new Table(composite, SWT.CHECK | SWT.BORDER | SWT.SINGLE | SWT.V_SCROLL | SWT.H_SCROLL | SWT.FULL_SELECTION); - table.setLayoutData(new GridData(GridData.FILL)); + table.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create()); table.setHeaderVisible(true); table.setLinesVisible(true);