Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/launch
diff options
context:
space:
mode:
authorNorbert Plött2006-09-13 07:01:24 +0000
committerNorbert Plött2006-09-13 07:01:24 +0000
commit92f1d746a0996dab3ad808d399ac8f21cd8fc8f6 (patch)
tree551721770884897ab96c7efd75f70b1374b939ba /launch
parentbe7b7d3fd0a299f81c3e7c3a910a5cca4f4b2780 (diff)
downloadorg.eclipse.cdt-92f1d746a0996dab3ad808d399ac8f21cd8fc8f6.tar.gz
org.eclipse.cdt-92f1d746a0996dab3ad808d399ac8f21cd8fc8f6.tar.xz
org.eclipse.cdt-92f1d746a0996dab3ad808d399ac8f21cd8fc8f6.zip
fixing bug #151946 - Bad layout of Arguments tab in C/C++ Local Application
Diffstat (limited to 'launch')
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LaunchMessages.properties5
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/WorkingDirectoryBlock.java21
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CArgumentsTab.java50
3 files changed, 41 insertions, 35 deletions
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LaunchMessages.properties b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LaunchMessages.properties
index 44cc1d39207..a73ae855444 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LaunchMessages.properties
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/LaunchMessages.properties
@@ -124,7 +124,7 @@ CEnvironmentTab.Environment=Environment
CEnvironmentTab.Existing_Environment_Variable=Existing Environment Variable
CEnvironmentTab.Environment_variable_NAME_exists=Environment variable \" {0} \" exists.\nDo you want to overwrite?
-CArgumentsTab.C/C++_Program_Arguments=C/C++ Program Arguments:
+CArgumentsTab.C/C++_Program_Arguments=Program arguments:
CArgumentsTab.Arguments=Arguments
CArgumentsTab.Variables=Variables...
@@ -132,8 +132,9 @@ WorkingDirectoryBlock.4=Select a &workspace relative working directory:
WorkingDirectoryBlock.7=Select a working directory for the launch configuration:
WorkingDirectoryBlock.0=W&orkspace...
WorkingDirectoryBlock.Working_Directory_8=Working Directory
+WorkingDirectoryBlock.Working_directory=Working directory:
WorkingDirectoryBlock.10=Working directory does not exist
-WorkingDirectoryBlock.Use_de&fault_working_directory_4=Use default wor&king directory
+WorkingDirectoryBlock.Use_default=Use de&fault
WorkingDirectoryBlock.17=Variabl&es...
WorkingDirectoryBlock.1=File S&ystem...
WorkingDirectoryBlock.Exception_occurred_reading_configuration___15=Exception occurred reading configuration:
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/WorkingDirectoryBlock.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/WorkingDirectoryBlock.java
index f454604bd67..8347cb4d625 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/WorkingDirectoryBlock.java
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/ui/WorkingDirectoryBlock.java
@@ -38,6 +38,7 @@ import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.DirectoryDialog;
+import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.dialogs.ContainerSelectionDialog;
@@ -94,33 +95,35 @@ public class WorkingDirectoryBlock extends CLaunchConfigurationTab {
public void createControl(Composite parent) {
Font font = parent.getFont();
- Composite comp = new Composite(parent, SWT.NONE);
+ Group group = new Group(parent, SWT.NONE);
// WorkbenchHelp.setHelp(group,
// IJavaDebugHelpContextIds.WORKING_DIRECTORY_BLOCK);
GridLayout workingDirLayout = new GridLayout();
workingDirLayout.numColumns = 2;
workingDirLayout.makeColumnsEqualWidth = false;
- comp.setLayout(workingDirLayout);
+ group.setLayout(workingDirLayout);
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- comp.setLayoutData(gd);
- comp.setFont(font);
- setControl(comp);
+ group.setLayoutData(gd);
+ group.setFont(font);
+ setControl(group);
- fWorkingDirText = new Text(comp, SWT.SINGLE | SWT.BORDER);
+ group.setText(LaunchMessages.getString("WorkingDirectoryBlock.Working_directory"));
+
+ fWorkingDirText = new Text(group, SWT.SINGLE | SWT.BORDER);
gd = new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalSpan = 2;
fWorkingDirText.setLayoutData(gd);
fWorkingDirText.setFont(font);
fWorkingDirText.addModifyListener(fListener);
- fUseDefaultWorkingDirButton = new Button(comp, SWT.CHECK);
- fUseDefaultWorkingDirButton.setText(LaunchMessages.getString("WorkingDirectoryBlock.Use_de&fault_working_directory_4")); //$NON-NLS-1$
+ fUseDefaultWorkingDirButton = new Button(group, SWT.CHECK);
+ fUseDefaultWorkingDirButton.setText(LaunchMessages.getString("WorkingDirectoryBlock.Use_default")); //$NON-NLS-1$
gd = new GridData(GridData.FILL_HORIZONTAL);
fUseDefaultWorkingDirButton.setLayoutData(gd);
fUseDefaultWorkingDirButton.setFont(font);
fUseDefaultWorkingDirButton.addSelectionListener(fListener);
- Composite buttonComp = new Composite(comp, SWT.NONE);
+ Composite buttonComp = new Composite(group, SWT.NONE);
GridLayout layout = new GridLayout(3, false);
layout.marginHeight = 0;
layout.marginWidth = 0;
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CArgumentsTab.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CArgumentsTab.java
index 4f6f4ee2475..4c302b7df40 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CArgumentsTab.java
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CArgumentsTab.java
@@ -27,12 +27,14 @@ import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Font;
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;
+import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
@@ -58,45 +60,45 @@ public class CArgumentsTab extends CLaunchConfigurationTab {
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#createControl(org.eclipse.swt.widgets.Composite)
*/
public void createControl(Composite parent) {
+ Font font = parent.getFont();
+ Composite comp = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout(1, true);
+ comp.setLayout(layout);
+ comp.setFont(font);
- Composite comp = new Composite(parent, SWT.NONE);
- setControl(comp);
-
+ GridData gd = new GridData(GridData.FILL_BOTH);
+ comp.setLayoutData(gd);
+ setControl(comp);
+
LaunchUIPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(getControl(), ICDTLaunchHelpContextIds.LAUNCH_CONFIGURATION_DIALOG_ARGUMNETS_TAB);
- GridLayout topLayout = new GridLayout();
- comp.setLayout(topLayout);
-
- createVerticalSpacer(comp, 1);
createArgumentComponent(comp, 1);
- createVerticalSpacer(comp, 1);
fWorkingDirectoryBlock.createControl(comp);
}
- protected void createArgumentComponent(Composite comp, int i) {
- Composite argsComp = new Composite(comp, SWT.NONE);
- GridLayout projLayout = new GridLayout();
- projLayout.numColumns = 1;
- projLayout.marginHeight = 0;
- projLayout.marginWidth = 0;
- argsComp.setLayout(projLayout);
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- gd.horizontalSpan = i;
- argsComp.setLayoutData(gd);
-
- fPrgmArgumentsLabel = new Label(argsComp, SWT.NONE);
- fPrgmArgumentsLabel.setText(LaunchMessages.getString("CArgumentsTab.C/C++_Program_Arguments")); //$NON-NLS-1$
- fPrgmArgumentsText = new Text(argsComp, SWT.MULTI | SWT.WRAP | SWT.BORDER | SWT.V_SCROLL);
- gd = new GridData(GridData.FILL_HORIZONTAL);
+ protected void createArgumentComponent(Composite comp, int horizontalSpan) {
+ Font font = comp.getFont();
+ Group group = new Group(comp, SWT.NONE);
+ group.setFont(font);
+ group.setLayout(new GridLayout());
+ GridData gd = new GridData(GridData.FILL_BOTH);
+ gd.horizontalSpan = horizontalSpan;
+ group.setLayoutData(gd);
+
+ group.setText(LaunchMessages.getString("CArgumentsTab.C/C++_Program_Arguments")); //$NON-NLS-1$
+ fPrgmArgumentsText = new Text(group, SWT.MULTI | SWT.WRAP | SWT.BORDER | SWT.V_SCROLL);
+ gd = new GridData(GridData.FILL_BOTH);
gd.heightHint = 40;
+ gd.widthHint = 100;
fPrgmArgumentsText.setLayoutData(gd);
+ fPrgmArgumentsText.setFont(font);
fPrgmArgumentsText.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent evt) {
updateLaunchConfigurationDialog();
}
});
- fArgumentVariablesButton= createPushButton(argsComp, LaunchMessages.getString("CArgumentsTab.Variables"), null); //$NON-NLS-1$
+ fArgumentVariablesButton= createPushButton(group, LaunchMessages.getString("CArgumentsTab.Variables"), null); //$NON-NLS-1$
gd = new GridData(GridData.HORIZONTAL_ALIGN_END);
fArgumentVariablesButton.setLayoutData(gd);
fArgumentVariablesButton.addSelectionListener(new SelectionAdapter() {

Back to the top