From 373113454d035a00e06cbc6279e0aa3c0e234097 Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Fri, 1 Mar 2013 13:35:27 +0100 Subject: [PATCH] Removed some java compile time warnings --- app/src/processing/app/Base.java | 7 ------- app/src/processing/app/I18n.java | 15 ++++++++++++++- app/src/processing/app/debug/TargetPlatform.java | 6 ------ 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/app/src/processing/app/Base.java b/app/src/processing/app/Base.java index 169aba346..eb4545958 100644 --- a/app/src/processing/app/Base.java +++ b/app/src/processing/app/Base.java @@ -1082,13 +1082,6 @@ public class Base { PreferencesMap prefs = targetPlatform.getPreferences(); String targetname = prefs.get("name"); - if (false) { - // Hack to extract these words by gettext tool. - // These phrases are actually defined in the "platform.txt". - String notused = _("Arduino AVR Boards"); - notused = _("Arduino ARM (32-bits) Boards"); - } - JMenuItem platformItem = new JMenuItem(_(targetname)); platformItem.setEnabled(false); importMenu.add(platformItem); diff --git a/app/src/processing/app/I18n.java b/app/src/processing/app/I18n.java index b1f5be1a0..237cebac1 100644 --- a/app/src/processing/app/I18n.java +++ b/app/src/processing/app/I18n.java @@ -14,7 +14,6 @@ package processing.app; import java.util.*; -import java.util.Locale.*; import java.text.MessageFormat; public class I18n { @@ -58,4 +57,18 @@ public class I18n { public static String format(String fmt, Object ... args) { return MessageFormat.format(fmt, args); } + + /** + * Does nothing. + * + * This method is an hack to extract words with gettext tool. + */ + protected static void unusedStrings() { + // These phrases are defined in the "platform.txt". + _("Arduino AVR Boards"); + _("Arduino ARM (32-bits) Boards"); + + // This word is defined in the "boards.txt". + _("Processor"); + } } diff --git a/app/src/processing/app/debug/TargetPlatform.java b/app/src/processing/app/debug/TargetPlatform.java index acd12b3fe..5ff600adf 100644 --- a/app/src/processing/app/debug/TargetPlatform.java +++ b/app/src/processing/app/debug/TargetPlatform.java @@ -47,12 +47,6 @@ public class TargetPlatform { programmers = new HashMap(); preferences = new PreferencesMap(); - if (false) { - // Hack to extract this word by gettext tool. - // This word is actually defined in the "boards.txt". - String notused = _("Processor"); - } - try { File boardsFile = new File(_folder, "boards.txt"); if (boardsFile.exists() && boardsFile.canRead()) {