1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 22:52:11 +02:00

The "Debugger" tab of the launch configuration dialog is too wide.

This commit is contained in:
Mikhail Khodjaiants 2005-09-08 21:50:01 +00:00
parent 3b1a507cc6
commit d616526e79
2 changed files with 15 additions and 19 deletions

View file

@ -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 2005-09-06 Mikhail Khodjaiants
Cleanup: replaced "new Boolean" by the static Boolean objects (Java 1.4). Cleanup: replaced "new Boolean" by the static Boolean objects (Java 1.4).
* CDebuggerTab.java * CDebuggerTab.java

View file

@ -36,11 +36,13 @@ import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path; import org.eclipse.core.runtime.Path;
import org.eclipse.debug.core.ILaunchConfiguration; import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.debug.internal.ui.SWTUtil;
import org.eclipse.jface.dialogs.Dialog; import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.IDialogConstants; import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.swt.SWT; import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Button;
@ -134,7 +136,8 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
setControl(comp); setControl(comp);
LaunchUIPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(getControl(), LaunchUIPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(getControl(),
ICDTLaunchHelpContextIds.LAUNCH_CONFIGURATION_DIALOG_DEBBUGER_TAB); 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); comp.setLayout(layout);
GridData gd = new GridData( GridData.BEGINNING, GridData.CENTER, true, false ); GridData gd = new GridData( GridData.BEGINNING, GridData.CENTER, true, false );
comp.setLayoutData(gd); comp.setLayoutData(gd);
@ -326,19 +329,12 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
protected void createOptionsComposite(Composite parent) { protected void createOptionsComposite(Composite parent) {
Composite optionsComp = new Composite(parent, SWT.NONE); Composite optionsComp = new Composite(parent, SWT.NONE);
int numberOfColumns = (fAttachMode) ? 1 : 2;
if (fAttachMode == true) { GridLayout layout = new GridLayout( numberOfColumns, false );
GridLayout layout = new GridLayout( 1, false );
optionsComp.setLayout( layout ); optionsComp.setLayout( layout );
optionsComp.setLayoutData( new GridData( GridData.BEGINNING, GridData.CENTER, true, false, 1, 1 ) ); optionsComp.setLayoutData( new GridData( GridData.BEGINNING, GridData.CENTER, true, false, 1, 1 ) );
} else { if (fAttachMode == false) {
GridLayout layout = new GridLayout( 2, false );
optionsComp.setLayout( layout );
optionsComp.setLayoutData( new GridData( GridData.BEGINNING, GridData.CENTER, true, false, 2, 1 ) );
fStopInMain = createCheckButton( optionsComp, LaunchMessages.getString( "CDebuggerTab.Stop_at_main_on_startup" ) ); //$NON-NLS-1$ 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() { fStopInMain.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) { 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$ fAdvancedButton = createPushButton(optionsComp, LaunchMessages.getString("CDebuggerTab.Advanced"), null); //$NON-NLS-1$
GridData data = new GridData(); ((GridData)fAdvancedButton.getLayoutData()).horizontalAlignment = GridData.END;
data.horizontalAlignment = GridData.END;
PixelConverter pc = new PixelConverter(parent);
data.widthHint = pc.convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
fAdvancedButton.setLayoutData(data);
fAdvancedButton.addSelectionListener(new SelectionAdapter() { fAdvancedButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) { public void widgetSelected(SelectionEvent e) {