From d616526e79ab3e7bc85fc672c8b85e46610566f3 Mon Sep 17 00:00:00 2001 From: Mikhail Khodjaiants Date: Thu, 8 Sep 2005 21:50:01 +0000 Subject: [PATCH] The "Debugger" tab of the launch configuration dialog is too wide. --- launch/org.eclipse.cdt.launch/ChangeLog | 4 +++ .../eclipse/cdt/launch/ui/CDebuggerTab.java | 30 +++++++------------ 2 files changed, 15 insertions(+), 19 deletions(-) diff --git a/launch/org.eclipse.cdt.launch/ChangeLog b/launch/org.eclipse.cdt.launch/ChangeLog index dc37d9ed5f0..f5617daea7b 100644 --- a/launch/org.eclipse.cdt.launch/ChangeLog +++ b/launch/org.eclipse.cdt.launch/ChangeLog @@ -1,3 +1,7 @@ +2005-09-08 Mikhail Khodjaiants + The "Debugger" tab of the launch configuration dialog is too wide. + * CDebuggerTab.java + 2005-09-06 Mikhail Khodjaiants Cleanup: replaced "new Boolean" by the static Boolean objects (Java 1.4). * CDebuggerTab.java diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CDebuggerTab.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CDebuggerTab.java index 2bc50b39070..dcde2361e97 100644 --- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CDebuggerTab.java +++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CDebuggerTab.java @@ -36,11 +36,13 @@ import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.Path; import org.eclipse.debug.core.ILaunchConfiguration; import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; +import org.eclipse.debug.internal.ui.SWTUtil; import org.eclipse.jface.dialogs.Dialog; import org.eclipse.jface.dialogs.IDialogConstants; import org.eclipse.swt.SWT; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.graphics.Image; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Button; @@ -134,12 +136,13 @@ public class CDebuggerTab extends AbstractCDebuggerTab { setControl(comp); LaunchUIPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(getControl(), ICDTLaunchHelpContextIds.LAUNCH_CONFIGURATION_DIALOG_DEBBUGER_TAB); - GridLayout layout = new GridLayout(2, true); + int numberOfColumns = ( fAttachMode ) ? 2 : 1; + GridLayout layout = new GridLayout(numberOfColumns, false); comp.setLayout(layout); GridData gd = new GridData( GridData.BEGINNING, GridData.CENTER, true, false ); comp.setLayoutData(gd); - createDebuggerCombo( comp, ( fAttachMode ) ? 1 : 2 ); + createDebuggerCombo(comp, ( fAttachMode ) ? 1 : 2 ); createOptionsComposite(comp); createDebuggerGroup(comp, 2); } @@ -326,19 +329,12 @@ public class CDebuggerTab extends AbstractCDebuggerTab { protected void createOptionsComposite(Composite parent) { Composite optionsComp = new Composite(parent, SWT.NONE); - - if (fAttachMode == true) { - GridLayout layout = new GridLayout( 1, false ); - optionsComp.setLayout( layout ); - optionsComp.setLayoutData( new GridData( GridData.BEGINNING, GridData.CENTER, true, false, 1, 1 ) ); - } else { - GridLayout layout = new GridLayout( 2, false ); - optionsComp.setLayout( layout ); - optionsComp.setLayoutData( new GridData( GridData.BEGINNING, GridData.CENTER, true, false, 2, 1 ) ); + int numberOfColumns = (fAttachMode) ? 1 : 2; + GridLayout layout = new GridLayout( numberOfColumns, false ); + optionsComp.setLayout( layout ); + optionsComp.setLayoutData( new GridData( GridData.BEGINNING, GridData.CENTER, true, false, 1, 1 ) ); + if (fAttachMode == false) { fStopInMain = createCheckButton( optionsComp, LaunchMessages.getString( "CDebuggerTab.Stop_at_main_on_startup" ) ); //$NON-NLS-1$ - GridData data = new GridData(); - data.horizontalAlignment = GridData.BEGINNING; - fStopInMain.setLayoutData(data); fStopInMain.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { @@ -349,11 +345,7 @@ public class CDebuggerTab extends AbstractCDebuggerTab { }); } fAdvancedButton = createPushButton(optionsComp, LaunchMessages.getString("CDebuggerTab.Advanced"), null); //$NON-NLS-1$ - GridData data = new GridData(); - data.horizontalAlignment = GridData.END; - PixelConverter pc = new PixelConverter(parent); - data.widthHint = pc.convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH); - fAdvancedButton.setLayoutData(data); + ((GridData)fAdvancedButton.getLayoutData()).horizontalAlignment = GridData.END; fAdvancedButton.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) {