From 196349f9fa15147eea15ee95e8d6b2ca4bdffc04 Mon Sep 17 00:00:00 2001 From: Vivian Kong Date: Tue, 29 May 2007 19:25:28 +0000 Subject: [PATCH] Patch for bug 187634 by Jason Montojo - "Debug" and "Release" shared in the menu and in the file system --- .../plugin.properties | 3 +++ .../cdt/managedbuilder/ui/properties/NewCfgDialog.java | 10 ++++++++++ .../eclipse/cdt/ui/newui/NewConfigurationDialog.java | 10 +++++++++- .../eclipse/cdt/ui/newui/PluginResources.properties | 2 ++ .../cdt/ui/newui/RenameConfigurationDialog.java | 10 ++++++++++ 5 files changed, 34 insertions(+), 1 deletion(-) diff --git a/build/org.eclipse.cdt.managedbuilder.gnu.ui/plugin.properties b/build/org.eclipse.cdt.managedbuilder.gnu.ui/plugin.properties index 34c6633d4b0..e5972055303 100644 --- a/build/org.eclipse.cdt.managedbuilder.gnu.ui/plugin.properties +++ b/build/org.eclipse.cdt.managedbuilder.gnu.ui/plugin.properties @@ -7,6 +7,7 @@ # # Contributors: # Texas Instruments Inc. - initial API and implementation +# IBM Corporation ############################################################################### # plugin names @@ -38,8 +39,10 @@ TargetName.linux.lib=Linux Static Library TargetName.solaris=Solaris # Default Configuration Names +# START NON-TRANSLATABLE ConfigName.Rel=Release ConfigName.Dbg=Debug +# END NON-TRANSLATABLE # Generic tool-chain names ToolChainName.Rel=GCC Tool Chain diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/NewCfgDialog.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/NewCfgDialog.java index 0f14984aa19..a263e8150b4 100644 --- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/NewCfgDialog.java +++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/NewCfgDialog.java @@ -7,6 +7,7 @@ * * Contributors: * Intel Corporation - Initial API and implementation + * IBM Corporation *******************************************************************************/ package org.eclipse.cdt.managedbuilder.ui.properties; @@ -138,6 +139,15 @@ public class NewCfgDialog implements INewCfgDialog { GridData gd = new GridData(GridData.FILL_HORIZONTAL); gd.horizontalSpan = 3; group1.setLayoutData(gd); + + // bug 187634: Add a label to warn user that configuration name will be used directly + // as a directory name in the filesystem. + Label warningLabel = new Label(group1, SWT.BEGINNING | SWT.WRAP); + warningLabel.setFont(parent.getFont()); + warningLabel.setText(UIMessages.getString("NewConfiguration.label.warning")); //$NON-NLS-1$ + gd = new GridData(SWT.FILL, SWT.BEGINNING, true, false, 3, 1); + gd.widthHint = 300; + warningLabel.setLayoutData(gd); // Add a label and a text widget for Configuration's name final Label nameLabel = new Label(group1, SWT.LEFT); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/NewConfigurationDialog.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/NewConfigurationDialog.java index e57b26bc1c2..c0187b36c80 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/NewConfigurationDialog.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/NewConfigurationDialog.java @@ -139,7 +139,6 @@ public class NewConfigurationDialog extends Dialog implements INewCfgDialog { } protected Control createDialogArea(Composite parent) { - Composite composite = new Composite(parent, SWT.NULL); composite.setFont(parent.getFont()); composite.setLayout(new GridLayout(3, false)); @@ -155,6 +154,15 @@ public class NewConfigurationDialog extends Dialog implements INewCfgDialog { gd.horizontalSpan = 3; group1.setLayoutData(gd); + // bug 187634: Add a label to warn user that configuration name will be used directly + // as a directory name in the filesystem. + Label warningLabel = new Label(group1, SWT.BEGINNING | SWT.WRAP); + warningLabel.setFont(parent.getFont()); + warningLabel.setText(UIMessages.getString("NewConfiguration.label.warning")); //$NON-NLS-1$ + gd = new GridData(SWT.FILL, SWT.BEGINNING, true, false, 3, 1); + gd.widthHint = 300; + warningLabel.setLayoutData(gd); + // Add a label and a text widget for Configuration's name final Label nameLabel = new Label(group1, SWT.LEFT); nameLabel.setFont(parent.getFont()); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/PluginResources.properties b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/PluginResources.properties index 57f4ea85cec..161939c9ebc 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/PluginResources.properties +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/PluginResources.properties @@ -246,6 +246,7 @@ NewConfiguration.label.group=Copy settings from NewConfiguration.label.copy=Default configuration: NewConfiguration.label.clone=Existing configuration: NewConfiguration.label.showall=Show unsupported configurations +NewConfiguration.label.warning=Note: The configuration name will be used as a directory name in the file system. Please ensure that it is valid for your platform. NewConfiguration.error.duplicateName=A configuration named "{0}" already exists. NewConfiguration.error.caseName=A configuration name that differs only in case to "{0}" exists. NewConfiguration.error.invalidName=The name "{0}" is invalid. @@ -253,6 +254,7 @@ NewConfiguration.error.invalidName=The name "{0}" is invalid. # ----------- Rename Configuration ----------- RenameConfiguration.label.name=Name: RenameConfiguration.label.description=Description: +RenameConfiguration.label.warning=Note: The configuration name will be used as a directory name in the file system. Please ensure that it is valid for your platform. RenameConfiguration.error.duplicateName=A configuration named "{0}" already exists. RenameConfiguration.error.caseName=A configuration name that differs only in case to "{0}" exists. RenameConfiguration.error.invalidName=The name "{0}" is invalid. diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/RenameConfigurationDialog.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/RenameConfigurationDialog.java index 1e29a17407e..805cc325963 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/RenameConfigurationDialog.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/ui/newui/RenameConfigurationDialog.java @@ -7,6 +7,7 @@ * * Contributors: * Intel Corporation - Initial API and implementation + * IBM Corporation *******************************************************************************/ package org.eclipse.cdt.ui.newui; @@ -120,6 +121,15 @@ public class RenameConfigurationDialog extends Dialog { gd.horizontalSpan = 3; group1.setLayoutData(gd); + // bug 187634: Add a label to warn user that configuration name will be used directly + // as a directory name in the filesystem. + Label warningLabel = new Label(group1, SWT.BEGINNING | SWT.WRAP); + warningLabel.setFont(parent.getFont()); + warningLabel.setText(UIMessages.getString("RenameConfiguration.label.warning")); //$NON-NLS-1$ + gd = new GridData(SWT.FILL, SWT.BEGINNING, true, false, 3, 1); + gd.widthHint = 300; + warningLabel.setLayoutData(gd); + // Add a label and a text widget for Configuration's name final Label nameLabel = new Label(group1, SWT.LEFT); nameLabel.setFont(parent.getFont());