Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Blewitt2016-04-18 04:07:43 -0400
committerAlex Blewitt2016-04-18 18:15:05 -0400
commit809598db9dcc078cc4d7cffd4da3d0fc0b0716a3 (patch)
treee9d58143907e0396806f1f2170f4942db8c0c013 /build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder
parent135bdd42941dafc9afd3e00dbdad8c334d065dc2 (diff)
downloadorg.eclipse.cdt-809598db9dcc078cc4d7cffd4da3d0fc0b0716a3.tar.gz
org.eclipse.cdt-809598db9dcc078cc4d7cffd4da3d0fc0b0716a3.tar.xz
org.eclipse.cdt-809598db9dcc078cc4d7cffd4da3d0fc0b0716a3.zip
Bug 491945 - Remove new String()
Occurrences of `new String()` have been replaced with the equivalent `""` and additional NON-NLS tags have been inserted in where appropriate. Change-Id: I54cf71dcd0d5a92a675a71166d66949533de502b Signed-off-by: Alex Blewitt <alex.blewitt@gmail.com>
Diffstat (limited to 'build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder')
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildOptionComboFieldEditor.java6
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildStepsTab.java6
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/NewBuildConfigurationDialog.java12
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/NewCfgDialog.java6
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/NewVarDialog.java4
5 files changed, 17 insertions, 17 deletions
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildOptionComboFieldEditor.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildOptionComboFieldEditor.java
index 5587346891..a9131a7e76 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildOptionComboFieldEditor.java
+++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildOptionComboFieldEditor.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2002, 2010 IBM Corporation and others.
+ * Copyright (c) 2002, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -132,7 +132,7 @@ public class BuildOptionComboFieldEditor extends FieldEditor {
public void widgetSelected(SelectionEvent evt) {
String oldValue = selected;
int index = optionSelector.getSelectionIndex();
- selected = index == -1 ? new String() : optionSelector.getItem(index);
+ selected = index == -1 ? "" : optionSelector.getItem(index); // $NON-NLS-1$
setPresentsDefaultValue(false);
fireValueChanged(VALUE, oldValue, selected);
}
@@ -171,7 +171,7 @@ public class BuildOptionComboFieldEditor extends FieldEditor {
protected void doStore() {
// Save the selected item in the store
int index = optionSelector.getSelectionIndex();
- selected = index == -1 ? new String() : optionSelector.getItem(index);
+ selected = index == -1 ? "" : optionSelector.getItem(index); // $NON-NLS-1$
getPreferenceStore().setValue(getPreferenceName(), selected);
}
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildStepsTab.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildStepsTab.java
index b9e0ec7d67..886bcc323f 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildStepsTab.java
+++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/BuildStepsTab.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2011 Intel Corporation and others.
+ * Copyright (c) 2007, 2016 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -273,7 +273,7 @@ public class BuildStepsTab extends AbstractCBuildPropertyTab {
rcbsTool = rcConfig.createTool(null,rcbsToolId + "." + ManagedBuildManager.getRandomNumber(),rcbsToolName,false); //$NON-NLS-1$
rcbsTool.setCustomBuildStep(true);
IInputType rcbsToolInputType = rcbsTool.createInputType(null,rcbsToolInputTypeId + "." + ManagedBuildManager.getRandomNumber(),rcbsToolInputTypeName,false); //$NON-NLS-1$
- IAdditionalInput rcbsToolInputTypeAdditionalInput = rcbsToolInputType.createAdditionalInput(new String());
+ IAdditionalInput rcbsToolInputTypeAdditionalInput = rcbsToolInputType.createAdditionalInput(""); // $NON-NLS-1$
rcbsToolInputTypeAdditionalInput.setKind(IAdditionalInput.KIND_ADDITIONAL_INPUT_DEPENDENCY);
rcbsTool.createOutputType(null,rcbsToolOutputTypeId + "." + ManagedBuildManager.getRandomNumber(),rcbsToolOutputTypeName,false); //$NON-NLS-1$
}
@@ -298,7 +298,7 @@ public class BuildStepsTab extends AbstractCBuildPropertyTab {
private String createList(String[] items) {
if(items == null)
- return new String();
+ return ""; // $NON-NLS-1$
StringBuffer path = new StringBuffer(EMPTY_STR);
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/NewBuildConfigurationDialog.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/NewBuildConfigurationDialog.java
index a11dac24d2..b8d0218048 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/NewBuildConfigurationDialog.java
+++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/NewBuildConfigurationDialog.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2011 IBM Corporation and others.
+ * Copyright (c) 2003, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -88,8 +88,8 @@ public class NewBuildConfigurationDialog extends Dialog {
des = prjd;
setShellStyle(getShellStyle()|SWT.RESIZE);
- newName = new String();
- newDescription = new String();
+ newName = ""; // $NON-NLS-1$
+ newDescription = ""; // $NON-NLS-1$
parentConfig = null;
// The default behaviour is to clone the settings
@@ -110,9 +110,9 @@ public class NewBuildConfigurationDialog extends Dialog {
@Override
protected void buttonPressed(int buttonId) {
if (buttonId == IDialogConstants.OK_ID) {
- String description = new String();
- String nameAndDescription = new String();
- String baseConfigNameAndDescription = new String();
+ String description = ""; // $NON-NLS-1$
+ String nameAndDescription = ""; // $NON-NLS-1$
+ String baseConfigNameAndDescription = ""; // $NON-NLS-1$
newName = configName.getText().trim();
newDescription = configDescription.getText().trim();
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 524d6d2a61..608814b92d 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2013 Intel Corporation and others.
+ * Copyright (c) 2007, 2016 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -413,8 +413,8 @@ public class NewCfgDialog implements INewCfgDialog {
/**
*/
public NewCfgDialog() {
- newName = new String();
- newDescription = new String();
+ newName = ""; // $NON-NLS-1$
+ newDescription = ""; // $NON-NLS-1$
}
@Override
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/NewVarDialog.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/NewVarDialog.java
index ba932050ab..5ebd26f03a 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/NewVarDialog.java
+++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/NewVarDialog.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2011 Intel Corporation and others.
+ * Copyright (c) 2005, 2016 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -55,7 +55,7 @@ import com.ibm.icu.text.Collator;
* @noinstantiate This class is not intended to be instantiated by clients.
*/
public class NewVarDialog extends Dialog {
- private static final String EMPTY_STRING = new String();
+ private static final String EMPTY_STRING = ""; // $NON-NLS-1$
// The title of the dialog.
private String fTitle;

Back to the top