Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorJonah Graham2020-03-02 11:49:24 +0000
committerJonah Graham2020-03-02 11:49:24 +0000
commit5a6b9b4bf4b2d2ee60f2bc3f520abd01e7527dda (patch)
treeb2c7a606ec2bd9d34a11c9663312f9247e514d85 /build
parent87b627bf02eaab28cdb64f6ebe203ac64d18fe94 (diff)
downloadorg.eclipse.cdt-5a6b9b4bf4b2d2ee60f2bc3f520abd01e7527dda.tar.gz
org.eclipse.cdt-5a6b9b4bf4b2d2ee60f2bc3f520abd01e7527dda.tar.xz
org.eclipse.cdt-5a6b9b4bf4b2d2ee60f2bc3f520abd01e7527dda.zip
Revert "Bug 560614 - Drop dependency on ICU4J"
Diffstat (limited to 'build')
-rw-r--r--build/org.eclipse.cdt.make.core/META-INF/MANIFEST.MF3
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeMessages.java14
-rw-r--r--build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/LogWriter.java5
-rw-r--r--build/org.eclipse.cdt.make.ui/META-INF/MANIFEST.MF1
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MakeEnvironmentBlock.java3
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/actions/FoldingMessages.java18
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/MakeTargetDndUtil.java7
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/TextTransferDropTargetListener.java5
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/part/WizardCheckboxTablePart.java7
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/preferences/AbstractMakefileEditorPreferencePage.java3
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/views/DeleteTargetAction.java7
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/META-INF/MANIFEST.MF3
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/build/internal/core/scannerconfig/CfgScannerConfigUtil.java7
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/BuildModelMessages.java5
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ManagedMakeMessages.java5
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/dataprovider/DataProviderMessages.java5
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/language/settings/providers/CompilationDatabaseParser.java2
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/projectconverter/ConverterMessages.java5
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/newmake/internal/core/MakeMessages.java14
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/META-INF/MANIFEST.MF1
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/internal/ui/commands/BuildConfigurationsJob.java12
-rw-r--r--build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/properties/NewVarDialog.java3
22 files changed, 93 insertions, 42 deletions
diff --git a/build/org.eclipse.cdt.make.core/META-INF/MANIFEST.MF b/build/org.eclipse.cdt.make.core/META-INF/MANIFEST.MF
index a6ecd233217..bba11e9c22d 100644
--- a/build/org.eclipse.cdt.make.core/META-INF/MANIFEST.MF
+++ b/build/org.eclipse.cdt.make.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.cdt.make.core; singleton:=true
-Bundle-Version: 7.4.200.qualifier
+Bundle-Version: 7.4.100.qualifier
Bundle-Activator: org.eclipse.cdt.make.core.MakeCorePlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin
@@ -28,4 +28,5 @@ Require-Bundle: org.eclipse.cdt.core;bundle-version="[5.0.0,7.0.0)",
org.eclipse.tools.templates.freemarker;bundle-version="1.0.0"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Import-Package: com.ibm.icu.text
Automatic-Module-Name: org.eclipse.cdt.make.core
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeMessages.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeMessages.java
index 3b18e3ae905..d6726852aee 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeMessages.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/MakeMessages.java
@@ -13,10 +13,11 @@
*******************************************************************************/
package org.eclipse.cdt.make.internal.core;
-import java.text.MessageFormat;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
+import com.ibm.icu.text.MessageFormat;
+
public class MakeMessages {
private static final String RESOURCE_BUNDLE = MakeMessages.class.getName();
@@ -43,9 +44,18 @@ public class MakeMessages {
}
/**
+ * Gets a string from the resource bundle and formats it with the argument
+ *
+ * @param key the string used to get the bundle value, must not be null
+ */
+ public static String getFormattedString(String key, Object arg) {
+ return MessageFormat.format(getString(key), new Object[] { arg });
+ }
+
+ /**
* Gets a string from the resource bundle and formats it with arguments
*/
- public static String getFormattedString(String key, Object... args) {
+ public static String getFormattedString(String key, Object[] args) {
return MessageFormat.format(getString(key), args);
}
}
diff --git a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/LogWriter.java b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/LogWriter.java
index f41bfe1e0bc..7501751c391 100644
--- a/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/LogWriter.java
+++ b/build/org.eclipse.cdt.make.core/src/org/eclipse/cdt/make/internal/core/scannerconfig/util/LogWriter.java
@@ -20,13 +20,14 @@ import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.Writer;
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
import java.util.Date;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IStatus;
+import com.ibm.icu.text.DateFormat;
+import com.ibm.icu.text.SimpleDateFormat;
+
/**
* Log writer utility
*
diff --git a/build/org.eclipse.cdt.make.ui/META-INF/MANIFEST.MF b/build/org.eclipse.cdt.make.ui/META-INF/MANIFEST.MF
index 4070e4299b7..49a8648f96a 100644
--- a/build/org.eclipse.cdt.make.ui/META-INF/MANIFEST.MF
+++ b/build/org.eclipse.cdt.make.ui/META-INF/MANIFEST.MF
@@ -41,4 +41,5 @@ Require-Bundle: org.eclipse.ui.ide;bundle-version="[3.2.0,4.0.0)",
org.eclipse.cdt.launch;bundle-version="9.2.0"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Import-Package: com.ibm.icu.text
Automatic-Module-Name: org.eclipse.cdt.make.ui
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MakeEnvironmentBlock.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MakeEnvironmentBlock.java
index af51fe953d9..de4e28f8d14 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MakeEnvironmentBlock.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MakeEnvironmentBlock.java
@@ -13,7 +13,6 @@
*******************************************************************************/
package org.eclipse.cdt.make.internal.ui;
-import java.text.MessageFormat;
import java.util.Comparator;
import java.util.HashMap;
import java.util.Hashtable;
@@ -69,6 +68,8 @@ import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.TableItem;
import org.eclipse.ui.dialogs.ListSelectionDialog;
+import com.ibm.icu.text.MessageFormat;
+
/**
* @deprecated as of CDT 4.0. This tab was used to set preferences/properties
* for 3.X style projects.
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/actions/FoldingMessages.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/actions/FoldingMessages.java
index 09242adfd19..cf18a1f6ce0 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/actions/FoldingMessages.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/actions/FoldingMessages.java
@@ -17,10 +17,11 @@
package org.eclipse.cdt.make.internal.ui.actions;
-import java.text.MessageFormat;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
+import com.ibm.icu.text.MessageFormat;
+
/**
* Class that gives access to the folding messages resource bundle.
*/
@@ -64,10 +65,23 @@ public class FoldingMessages {
* under the given key, the key is returned.
*
* @param key the resource key
+ * @param arg the message argument
+ * @return the string
+ */
+ public static String getFormattedString(String key, Object arg) {
+ return getFormattedString(key, new Object[] { arg });
+ }
+
+ /**
+ * Returns the formatted resource string associated with the given key in the resource bundle.
+ * <code>MessageFormat</code> is used to format the message. If there isn't any value
+ * under the given key, the key is returned.
+ *
+ * @param key the resource key
* @param args the message arguments
* @return the string
*/
- public static String getFormattedString(String key, Object... args) {
+ public static String getFormattedString(String key, Object[] args) {
return MessageFormat.format(getString(key), args);
}
}
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/MakeTargetDndUtil.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/MakeTargetDndUtil.java
index 42546a89db3..135321b5871 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/MakeTargetDndUtil.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/MakeTargetDndUtil.java
@@ -15,7 +15,6 @@
package org.eclipse.cdt.make.internal.ui.dnd;
import java.lang.reflect.InvocationTargetException;
-import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.List;
@@ -44,6 +43,8 @@ import org.eclipse.swt.SWTException;
import org.eclipse.swt.dnd.DND;
import org.eclipse.swt.widgets.Shell;
+import com.ibm.icu.text.MessageFormat;
+
/**
* A collection of various functions for Make Target View drag and drop support.
*/
@@ -238,7 +239,7 @@ public class MakeTargetDndUtil {
// Try "Copy of name"
newName = MessageFormat.format(MakeUIPlugin.getResourceString("MakeTargetDnD.copyOf.uniqueName"), //$NON-NLS-1$
- targetName);
+ new Object[] { targetName });
if (makeTargetManager.findTarget(container, newName) == null) {
return newName;
}
@@ -246,7 +247,7 @@ public class MakeTargetDndUtil {
// Try "Copy (2) of name"
for (int counter = 1;; counter++) {
newName = MessageFormat.format(MakeUIPlugin.getResourceString("MakeTargetDnD.countedCopyOf.uniqueName"), //$NON-NLS-1$
- counter, targetName);
+ new Object[] { counter, targetName });
if (makeTargetManager.findTarget(container, newName) == null) {
return newName;
}
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/TextTransferDropTargetListener.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/TextTransferDropTargetListener.java
index bbe9124fc74..2da17066acf 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/TextTransferDropTargetListener.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/dnd/TextTransferDropTargetListener.java
@@ -14,7 +14,6 @@
package org.eclipse.cdt.make.internal.ui.dnd;
-import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.List;
@@ -29,6 +28,8 @@ import org.eclipse.swt.dnd.TextTransfer;
import org.eclipse.swt.dnd.Transfer;
import org.eclipse.swt.widgets.Shell;
+import com.ibm.icu.text.MessageFormat;
+
/**
* {@code TextTransferDropTargetListener} handles dropping of selected text to
* Make Target View. Each line of miltiline text passed is treated as separate
@@ -164,7 +165,7 @@ public class TextTransferDropTargetListener extends AbstractContainerAreaDropAda
String title = MakeUIPlugin.getResourceString("MakeTargetDnD.title.createFromTextConfirm"); //$NON-NLS-1$
String question = MessageFormat.format(
MakeUIPlugin.getResourceString("MakeTargetDnD.message.createFromTextConfirm"), //$NON-NLS-1$
- Integer.valueOf(makeTargets.length));
+ new Object[] { Integer.valueOf(makeTargets.length) });
String topTargets = ""; //$NON-NLS-1$
for (int i = 0; i < makeTargets.length; i++) {
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/part/WizardCheckboxTablePart.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/part/WizardCheckboxTablePart.java
index 9b7f040e4ed..db8f2a27ddd 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/part/WizardCheckboxTablePart.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/part/WizardCheckboxTablePart.java
@@ -13,8 +13,6 @@
*******************************************************************************/
package org.eclipse.cdt.make.internal.ui.part;
-import java.text.MessageFormat;
-
import org.eclipse.cdt.make.internal.ui.MakeUIPlugin;
import org.eclipse.jface.viewers.CheckboxTableViewer;
import org.eclipse.jface.viewers.StructuredViewer;
@@ -24,6 +22,8 @@ import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
+import com.ibm.icu.text.MessageFormat;
+
/**
* @version 1.0
*/
@@ -126,7 +126,8 @@ public class WizardCheckboxTablePart extends CheckboxTablePart {
protected void updateCounterLabel() {
String number = EMPTY_STRING + getSelectionCount();
String totalNumber = EMPTY_STRING + getTotalCount();
- String message = MessageFormat.format(MakeUIPlugin.getResourceString(KEY_COUNTER), number, totalNumber);
+ String message = MessageFormat.format(MakeUIPlugin.getResourceString(KEY_COUNTER),
+ new Object[] { number, totalNumber });
counterLabel.setText(message);
}
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/preferences/AbstractMakefileEditorPreferencePage.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/preferences/AbstractMakefileEditorPreferencePage.java
index efd1cbbeedd..9dfe6de71aa 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/preferences/AbstractMakefileEditorPreferencePage.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/preferences/AbstractMakefileEditorPreferencePage.java
@@ -17,7 +17,6 @@ package org.eclipse.cdt.make.internal.ui.preferences;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
-import java.text.MessageFormat;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
@@ -43,6 +42,8 @@ import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
+import com.ibm.icu.text.MessageFormat;
+
/**
* AbstraceMakeEditorPreferencePage
*/
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/views/DeleteTargetAction.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/views/DeleteTargetAction.java
index bced0df6596..ce35cf9faad 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/views/DeleteTargetAction.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/ui/views/DeleteTargetAction.java
@@ -13,7 +13,6 @@
*******************************************************************************/
package org.eclipse.cdt.make.ui.views;
-import java.text.MessageFormat;
import java.util.List;
import org.eclipse.cdt.make.core.IMakeTarget;
@@ -31,6 +30,8 @@ import org.eclipse.ui.ISharedImages;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.actions.SelectionListenerAction;
+import com.ibm.icu.text.MessageFormat;
+
/**
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
@@ -63,12 +64,12 @@ public class DeleteTargetAction extends SelectionListenerAction {
title = MakeUIPlugin.getResourceString("DeleteTargetAction.title.confirmDeletion"); //$NON-NLS-1$
IMakeTarget target = (IMakeTarget) targets.get(0);
msg = MessageFormat.format(MakeUIPlugin.getResourceString("DeleteTargetAction.message.confirmDeleteion"), //$NON-NLS-1$
- target.getName());
+ new Object[] { target.getName() });
} else {
title = MakeUIPlugin.getResourceString("DeleteTargetAction.title.confirmMultipleDeletion"); //$NON-NLS-1$
msg = MessageFormat.format(
MakeUIPlugin.getResourceString("DeleteTargetAction.message.confirmMultipleDeletion"), //$NON-NLS-1$
- Integer.valueOf(targets.size()));
+ new Object[] { Integer.valueOf(targets.size()) });
}
return MessageDialog.openQuestion(shell, title, msg);
}
diff --git a/build/org.eclipse.cdt.managedbuilder.core/META-INF/MANIFEST.MF b/build/org.eclipse.cdt.managedbuilder.core/META-INF/MANIFEST.MF
index 42d7b9f70da..ee0249ddded 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/META-INF/MANIFEST.MF
+++ b/build/org.eclipse.cdt.managedbuilder.core/META-INF/MANIFEST.MF
@@ -41,5 +41,6 @@ Require-Bundle: org.eclipse.cdt.core;bundle-version="[5.0.0,7.0.0)",
org.eclipse.core.filesystem;bundle-version="1.2.0"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Import-Package: com.google.gson;version="2.8.0"
+Import-Package: com.google.gson;version="2.8.0",
+ com.ibm.icu.text
Automatic-Module-Name: org.eclipse.cdt.managedbuilder.core
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/build/internal/core/scannerconfig/CfgScannerConfigUtil.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/build/internal/core/scannerconfig/CfgScannerConfigUtil.java
index eb16f894306..b0355bec955 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/build/internal/core/scannerconfig/CfgScannerConfigUtil.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/build/internal/core/scannerconfig/CfgScannerConfigUtil.java
@@ -13,7 +13,6 @@
*******************************************************************************/
package org.eclipse.cdt.build.internal.core.scannerconfig;
-import java.text.MessageFormat;
import java.util.Set;
import java.util.TreeSet;
@@ -31,6 +30,8 @@ import org.eclipse.cdt.managedbuilder.internal.core.Tool;
import org.eclipse.cdt.managedbuilder.internal.core.ToolChain;
import org.eclipse.core.runtime.Assert;
+import com.ibm.icu.text.MessageFormat;
+
public class CfgScannerConfigUtil {
public static CfgInfoContext adjustPerRcTypeContext(CfgInfoContext context) {
if (((Configuration) context.getConfiguration()).isPreference())
@@ -196,7 +197,7 @@ public class CfgScannerConfigUtil {
if (!(tool instanceof Tool)) {
String msg = MessageFormat.format(ManagedMakeMessages.getString("CfgScannerConfigUtil_ErrorNotSupported"), //$NON-NLS-1$
- Tool.class.getName());
+ new Object[] { Tool.class.getName() });
throw new UnsupportedOperationException(msg);
}
@@ -228,7 +229,7 @@ public class CfgScannerConfigUtil {
if (!(inputType instanceof InputType)) {
String msg = MessageFormat.format(ManagedMakeMessages.getString("CfgScannerConfigUtil_ErrorNotSupported"), //$NON-NLS-1$
- InputType.class.getName());
+ new Object[] { InputType.class.getName() });
throw new UnsupportedOperationException(msg);
}
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/BuildModelMessages.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/BuildModelMessages.java
index 8eac744b18e..1c15980a3f0 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/BuildModelMessages.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/buildmodel/BuildModelMessages.java
@@ -14,10 +14,11 @@
*******************************************************************************/
package org.eclipse.cdt.managedbuilder.internal.buildmodel;
-import java.text.MessageFormat;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
+import com.ibm.icu.text.MessageFormat;
+
public class BuildModelMessages {
private static final String BUNDLE_NAME = "org.eclipse.cdt.managedbuilder.internal.buildmodel.BuildModelMessages"; //$NON-NLS-1$
@@ -41,7 +42,7 @@ public class BuildModelMessages {
}
public static String getFormattedString(String key, String arg) {
- return MessageFormat.format(getResourceString(key), arg);
+ return MessageFormat.format(getResourceString(key), (Object[]) new String[] { arg });
}
public static String getFormattedString(String key, String[] args) {
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ManagedMakeMessages.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ManagedMakeMessages.java
index 7ddd1bee861..0380c9cf5fb 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ManagedMakeMessages.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ManagedMakeMessages.java
@@ -13,10 +13,11 @@
*******************************************************************************/
package org.eclipse.cdt.managedbuilder.internal.core;
-import java.text.MessageFormat;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
+import com.ibm.icu.text.MessageFormat;
+
/**
* @since 2.0
*/
@@ -49,7 +50,7 @@ public class ManagedMakeMessages {
}
public static String getFormattedString(String key, String arg) {
- return MessageFormat.format(getResourceString(key), arg);
+ return MessageFormat.format(getResourceString(key), new Object[] { arg });
}
public static String getFormattedString(String key, String[] args) {
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/dataprovider/DataProviderMessages.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/dataprovider/DataProviderMessages.java
index 6ea27aa6af0..372edb43ed4 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/dataprovider/DataProviderMessages.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/dataprovider/DataProviderMessages.java
@@ -13,10 +13,11 @@
*******************************************************************************/
package org.eclipse.cdt.managedbuilder.internal.dataprovider;
-import java.text.MessageFormat;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
+import com.ibm.icu.text.MessageFormat;
+
public class DataProviderMessages {
private static final String BUNDLE_NAME = "org.eclipse.cdt.managedbuilder.internal.dataprovider.DataProviderMessages"; //$NON-NLS-1$
@@ -40,7 +41,7 @@ public class DataProviderMessages {
}
public static String getFormattedString(String key, String arg) {
- return MessageFormat.format(getResourceString(key), arg);
+ return MessageFormat.format(getResourceString(key), new Object[] { arg });
}
public static String getFormattedString(String key, String[] args) {
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/language/settings/providers/CompilationDatabaseParser.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/language/settings/providers/CompilationDatabaseParser.java
index 882423e5dcc..e8c1e8a4a1c 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/language/settings/providers/CompilationDatabaseParser.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/language/settings/providers/CompilationDatabaseParser.java
@@ -17,7 +17,6 @@ import java.net.URI;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.file.attribute.FileTime;
-import java.text.MessageFormat;
import java.util.List;
import java.util.Set;
@@ -58,6 +57,7 @@ import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.SubMonitor;
import com.google.gson.Gson;
+import com.ibm.icu.text.MessageFormat;
/**
* This language settings provider takes a compile_commands.json file as input (aka, Compilation Database or CDB) and parses the commands
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/projectconverter/ConverterMessages.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/projectconverter/ConverterMessages.java
index 4b0b2261676..6f446c40b0a 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/projectconverter/ConverterMessages.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/projectconverter/ConverterMessages.java
@@ -13,10 +13,11 @@
*******************************************************************************/
package org.eclipse.cdt.managedbuilder.projectconverter;
-import java.text.MessageFormat;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
+import com.ibm.icu.text.MessageFormat;
+
/**
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
@@ -50,7 +51,7 @@ public class ConverterMessages {
}
public static String getFormattedString(String key, String arg) {
- return MessageFormat.format(getResourceString(key), arg);
+ return MessageFormat.format(getResourceString(key), new Object[] { arg });
}
public static String getFormattedString(String key, String[] args) {
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/newmake/internal/core/MakeMessages.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/newmake/internal/core/MakeMessages.java
index eeaa96ee0e2..ebf7b2ba9c1 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/newmake/internal/core/MakeMessages.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/newmake/internal/core/MakeMessages.java
@@ -13,10 +13,11 @@
*******************************************************************************/
package org.eclipse.cdt.newmake.internal.core;
-import java.text.MessageFormat;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
+import com.ibm.icu.text.MessageFormat;
+
public class MakeMessages {
private static final String RESOURCE_BUNDLE = MakeMessages.class.getName();
@@ -43,9 +44,18 @@ public class MakeMessages {
}
/**
+ * Gets a string from the resource bundle and formats it with the argument
+ *
+ * @param key the string used to get the bundle value, must not be null
+ */
+ public static String getFormattedString(String key, Object arg) {
+ return MessageFormat.format(getString(key), new Object[] { arg });
+ }
+
+ /**
* Gets a string from the resource bundle and formats it with arguments
*/
- public static String getFormattedString(String key, Object... args) {
+ public static String getFormattedString(String key, Object[] args) {
return MessageFormat.format(getString(key), args);
}
}
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/META-INF/MANIFEST.MF b/build/org.eclipse.cdt.managedbuilder.ui/META-INF/MANIFEST.MF
index 2d06e19ae95..efbfbdbb9fe 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/META-INF/MANIFEST.MF
+++ b/build/org.eclipse.cdt.managedbuilder.ui/META-INF/MANIFEST.MF
@@ -26,4 +26,5 @@ Require-Bundle: org.eclipse.core.resources;bundle-version="[3.2.0,4.0.0)",
org.eclipse.core.expressions
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Import-Package: com.ibm.icu.text
Automatic-Module-Name: org.eclipse.cdt.managedbuilder.ui
diff --git a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/internal/ui/commands/BuildConfigurationsJob.java b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/internal/ui/commands/BuildConfigurationsJob.java
index a974e242ec1..82683d692be 100644
--- a/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/internal/ui/commands/BuildConfigurationsJob.java
+++ b/build/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/internal/ui/commands/BuildConfigurationsJob.java
@@ -13,8 +13,6 @@
*******************************************************************************/
package org.eclipse.cdt.managedbuilder.internal.ui.commands;
-import java.text.MessageFormat;
-
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
import org.eclipse.cdt.managedbuilder.core.IConfiguration;
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
@@ -27,6 +25,8 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
+import com.ibm.icu.text.MessageFormat;
+
/**
* A job to build CDT build configurations.
*/
@@ -39,11 +39,11 @@ public class BuildConfigurationsJob extends Job {
String firstProjectName = cfgDescriptions[0].getProjectDescription().getName();
String firstConfigurationName = cfgDescriptions[0].getName();
if (isCleaning) {
- return MessageFormat.format(Messages.BuildConfigurationsJob_Cleaning, cfgDescriptions.length,
- firstProjectName, firstConfigurationName);
+ return MessageFormat.format(Messages.BuildConfigurationsJob_Cleaning,
+ new Object[] { cfgDescriptions.length, firstProjectName, firstConfigurationName });
} else {
- return MessageFormat.format(Messages.BuildConfigurationsJob_Building, cfgDescriptions.length,
- firstProjectName, firstConfigurationName);
+ return MessageFormat.format(Messages.BuildConfigurationsJob_Building,
+ new Object[] { cfgDescriptions.length, firstProjectName, firstConfigurationName });
}
}
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 31f5487c975..52da2e22d56 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
@@ -13,7 +13,6 @@
*******************************************************************************/
package org.eclipse.cdt.managedbuilder.ui.properties;
-import java.text.Collator;
import java.util.Arrays;
import java.util.Comparator;
@@ -50,6 +49,8 @@ import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
+import com.ibm.icu.text.Collator;
+
/**
* the dialog used to create or edit the build macro
*

Back to the top