diff --git a/tools/unicodetools/com/ibm/rbm/Bundle.java b/tools/unicodetools/com/ibm/rbm/Bundle.java index 71a2cd38fa0..ca1eecd0562 100644 --- a/tools/unicodetools/com/ibm/rbm/Bundle.java +++ b/tools/unicodetools/com/ibm/rbm/Bundle.java @@ -1,6 +1,6 @@ /* ***************************************************************************** - * Copyright (C) 2000-2004, International Business Machines Corporation and * + * Copyright (C) 2000-2007, International Business Machines Corporation and * * others. All Rights Reserved. * ***************************************************************************** */ @@ -243,9 +243,9 @@ public class Bundle { removeUntranslatedItemsByGroup(groupName); // Loop through all Items - Enumeration enum = allItems.elements(); - while(enum.hasMoreElements()) { - BundleItem item = (BundleItem)enum.nextElement(); + Enumeration elems = allItems.elements(); + while(elems.hasMoreElements()) { + BundleItem item = (BundleItem)elems.nextElement(); if (item.getParentGroup().getName().equals(groupName)) { allItems.remove(item); } diff --git a/tools/unicodetools/com/ibm/rbm/BundleItem.java b/tools/unicodetools/com/ibm/rbm/BundleItem.java index a53bd4e31a9..0ed03606f19 100644 --- a/tools/unicodetools/com/ibm/rbm/BundleItem.java +++ b/tools/unicodetools/com/ibm/rbm/BundleItem.java @@ -1,14 +1,8 @@ /* ***************************************************************************** - * Copyright (C) 2000-2002, International Business Machines Corporation and * + * Copyright (C) 2000-2007, International Business Machines Corporation and * * others. All Rights Reserved. * ***************************************************************************** - * - * $Source: /xsrl/Nsvn/icu/unicodetools/com/ibm/rbm/BundleItem.java,v $ - * $Date: 2004/07/14 18:29:00 $ - * $Revision: 1.4 $ - * - ***************************************************************************** */ package com.ibm.rbm; @@ -290,9 +284,9 @@ public class BundleItem { } if (creator != null) retStr += " @creator " + creator; if (modifier != null) retStr += " @modifier " + modifier; - Enumeration enum = lookups.keys(); - while (enum.hasMoreElements()) { - String str = (String)enum.nextElement(); + Enumeration elems = lookups.keys(); + while (elems.hasMoreElements()) { + String str = (String)elems.nextElement(); retStr += "\n# @{" + str + "} " + (String)lookups.get(str); } if (comment != null) retStr += "\n# @comment " + comment; diff --git a/tools/unicodetools/com/ibm/rbm/RBImporter.java b/tools/unicodetools/com/ibm/rbm/RBImporter.java index b9f8e1f7cca..724a5b98656 100644 --- a/tools/unicodetools/com/ibm/rbm/RBImporter.java +++ b/tools/unicodetools/com/ibm/rbm/RBImporter.java @@ -1,6 +1,6 @@ /* ***************************************************************************** - * Copyright (C) 2000-2004, International Business Machines Corporation and * + * Copyright (C) 2000-2007, International Business Machines Corporation and * * others. All Rights Reserved. * ***************************************************************************** */ @@ -290,7 +290,7 @@ public class RBImporter extends JDialog { progressBar.setValue(0); progressBarDialog.getContentPane().add(progressBar); progressBarDialog.pack(); - progressBarDialog.show(); + progressBarDialog.setVisible(true); } protected void incrementProgressBar() { diff --git a/tools/unicodetools/com/ibm/rbm/RBJavaImporter.java b/tools/unicodetools/com/ibm/rbm/RBJavaImporter.java index c7d83bc4e3d..922ffe84696 100644 --- a/tools/unicodetools/com/ibm/rbm/RBJavaImporter.java +++ b/tools/unicodetools/com/ibm/rbm/RBJavaImporter.java @@ -1,6 +1,6 @@ /* ***************************************************************************** - * Copyright (C) 2000-2004, International Business Machines Corporation and * + * Copyright (C) 2000-2007, International Business Machines Corporation and * * others. All Rights Reserved. * ***************************************************************************** */ @@ -62,9 +62,9 @@ public class RBJavaImporter extends RBImporter { e.printStackTrace(System.err); } if (base_lrb != null) { - Enumeration enum = base_lrb.getKeys(); - while (enum.hasMoreElements()) { - String key = enum.nextElement().toString(); + Enumeration keys = base_lrb.getKeys(); + while (keys.hasMoreElements()) { + String key = keys.nextElement().toString(); RBManagerGUI.debugMsg("Resource -> " + key + " = " + base_lrb.getString(key)); } } diff --git a/tools/unicodetools/com/ibm/rbm/RBManager.java b/tools/unicodetools/com/ibm/rbm/RBManager.java index c3324f9aee8..ca07a7012d6 100644 --- a/tools/unicodetools/com/ibm/rbm/RBManager.java +++ b/tools/unicodetools/com/ibm/rbm/RBManager.java @@ -1,6 +1,6 @@ /* ***************************************************************************** - * Copyright (C) 2000-2004, International Business Machines Corporation and * + * Copyright (C) 2000-2007, International Business Machines Corporation and * * others. All Rights Reserved. * ***************************************************************************** */ @@ -259,9 +259,9 @@ public class RBManager { // Now that we have parsed the entire main language file, populate the allNLSKey set with the dictionary keys allBundleKeys = new Vector(); - Enumeration enum = ((Bundle)bundles.elementAt(0)).allItems.keys(); - while (enum.hasMoreElements()) { - allBundleKeys.addElement(enum.nextElement()); + Enumeration keys = ((Bundle)bundles.elementAt(0)).allItems.keys(); + while (keys.hasMoreElements()) { + allBundleKeys.addElement(keys.nextElement()); } // Now go through all of the other languages @@ -323,9 +323,9 @@ public class RBManager { o = descriptors.get("modified"); if (o != null) item.setModifiedDate((String) o); // Lookup tags (e.g. {_#_} _description_) - Enumeration keys = descriptors.keys(); - while (keys.hasMoreElements()) { - String tag = (String)keys.nextElement(); + Enumeration descKeys = descriptors.keys(); + while (descKeys.hasMoreElements()) { + String tag = (String)descKeys.nextElement(); if (tag.startsWith("{")) { if (tag.indexOf("}") < 0) continue; String lookup = tag.substring(1,tag.indexOf("}")); @@ -609,9 +609,9 @@ public class RBManager { bundle.removeUntranslatedItem(itemName); // Loop through all Items - Enumeration enum = bundle.allItems.elements(); - while(enum.hasMoreElements()) { - BundleItem item = (BundleItem)enum.nextElement(); + Enumeration items = bundle.allItems.elements(); + while(items.hasMoreElements()) { + BundleItem item = (BundleItem)items.nextElement(); if (item.getKey().equals(itemName)) { bundle.allItems.remove(item); item.getParentGroup().removeBundleItem(item.getKey()); @@ -681,9 +681,9 @@ public class RBManager { item.setModifier(mainItem.getModifier()); item.setLookups(new Hashtable()); // TODO: This should be done in the Bundle class - Enumeration enum = mainItem.getLookups().keys(); - while (enum.hasMoreElements()) { - String name = (String)enum.nextElement(); + Enumeration keys = mainItem.getLookups().keys(); + while (keys.hasMoreElements()) { + String name = (String)keys.nextElement(); String value = (String)mainItem.getLookups().get(name); item.getLookups().put(new String(name), new String(value)); } diff --git a/tools/unicodetools/com/ibm/rbm/RBPropertiesImporter.java b/tools/unicodetools/com/ibm/rbm/RBPropertiesImporter.java index 017d68c500d..0c6cd294152 100644 --- a/tools/unicodetools/com/ibm/rbm/RBPropertiesImporter.java +++ b/tools/unicodetools/com/ibm/rbm/RBPropertiesImporter.java @@ -1,6 +1,6 @@ /* ***************************************************************************** - * Copyright (C) 2000-2004, International Business Machines Corporation and * + * Copyright (C) 2000-2007, International Business Machines Corporation and * * others. All Rights Reserved. * ***************************************************************************** */ @@ -76,9 +76,9 @@ public class RBPropertiesImporter extends RBImporter { resolveEncodings(encodings); for (int i=0; i < bundles.size(); i++) { Bundle b = (Bundle)bundles.elementAt(i); - Enumeration enum = b.allItems.keys(); - while (enum.hasMoreElements()) { - String key = (String)enum.nextElement(); + Enumeration keys = b.allItems.keys(); + while (keys.hasMoreElements()) { + String key = (String)keys.nextElement(); BundleItem item = (BundleItem)b.allItems.get(key); importResource(item, b.encoding, (item.getParentGroup() == null ? getDefaultGroup(): item.getParentGroup().getName())); } @@ -105,9 +105,9 @@ public class RBPropertiesImporter extends RBImporter { (children_v.elementAt(i).toString().equals("") ? "" : "_" + children_v.elementAt(i).toString()) + ".properties")); p.load(fis); - Enumeration enum = p.keys(); - while (enum.hasMoreElements()) { - String key = (String)enum.nextElement(); + Enumeration keys = p.keys(); + while (keys.hasMoreElements()) { + String key = (String)keys.nextElement(); BundleItem item = new BundleItem(null, key, p.getProperty(key)); item.setTranslated(this.getDefaultTranslated()); importResource(item, children_v.elementAt(i).toString(), getDefaultGroup()); diff --git a/tools/unicodetools/com/ibm/rbm/RBReporter.java b/tools/unicodetools/com/ibm/rbm/RBReporter.java index fd919c02822..6e7ac8d44b9 100644 --- a/tools/unicodetools/com/ibm/rbm/RBReporter.java +++ b/tools/unicodetools/com/ibm/rbm/RBReporter.java @@ -1,6 +1,6 @@ /* ***************************************************************************** - * Copyright (C) 2000-2004, International Business Machines Corporation and * + * Copyright (C) 2000-2007, International Business Machines Corporation and * * others. All Rights Reserved. * ***************************************************************************** */ @@ -422,9 +422,9 @@ public class RBReporter extends JFrame { int untranslated = 0; String untransStr = new String(); - Enumeration enum = dict.allItems.elements(); - while (enum.hasMoreElements()) { - BundleItem tempItem = (BundleItem)enum.nextElement(); + Enumeration items = dict.allItems.elements(); + while (items.hasMoreElements()) { + BundleItem tempItem = (BundleItem)items.nextElement(); if (tempItem.isTranslated()) continue; untranslated++; untransStr += " " + tempItem.getKey(); @@ -512,9 +512,9 @@ public class RBReporter extends JFrame { body_elem.appendChild(block_elem); int untranslated = 0; - Enumeration enum = dict.allItems.elements(); - while (enum.hasMoreElements()) { - BundleItem tempItem = (BundleItem)enum.nextElement(); + Enumeration items = dict.allItems.elements(); + while (items.hasMoreElements()) { + BundleItem tempItem = (BundleItem)items.nextElement(); if (tempItem.isTranslated()) continue; untranslated++; if (detailed) { @@ -542,10 +542,10 @@ public class RBReporter extends JFrame { buffer.append("

Number of NLS items in the file: " + String.valueOf(dict.allItems.size()) + "

\n"); int untranslated = 0; - Enumeration enum = dict.allItems.elements(); + Enumeration items = dict.allItems.elements(); StringBuffer innerBuffer = new StringBuffer(); - while (enum.hasMoreElements()) { - BundleItem tempItem = (BundleItem)enum.nextElement(); + while (items.hasMoreElements()) { + BundleItem tempItem = (BundleItem)items.nextElement(); if (tempItem.isTranslated()) continue; untranslated++; innerBuffer.append("
  • " + tempItem.getKey() + "
  • \n"); @@ -614,9 +614,9 @@ public class RBReporter extends JFrame { if (detailed) lang_report_elem.appendChild(untranslated_elem); int untranslated = 0; - Enumeration enum = dict.allItems.elements(); - while (enum.hasMoreElements()) { - BundleItem tempItem = (BundleItem)enum.nextElement(); + Enumeration items = dict.allItems.elements(); + while (items.hasMoreElements()) { + BundleItem tempItem = (BundleItem)items.nextElement(); if (tempItem.isTranslated()) continue; untranslated++; Element resource_elem = xml.createElement("RESOURCEKEY"); @@ -640,10 +640,10 @@ public class RBReporter extends JFrame { buffer.append("\t" + String.valueOf(dict.allItems.size()) + "\n"); int untranslated = 0; - Enumeration enum = dict.allItems.elements(); + Enumeration items = dict.allItems.elements(); StringBuffer innerBuffer = new StringBuffer(); - while (enum.hasMoreElements()) { - BundleItem tempItem = (BundleItem)enum.nextElement(); + while (items.hasMoreElements()) { + BundleItem tempItem = (BundleItem)items.nextElement(); if (tempItem.isTranslated()) continue; untranslated++; innerBuffer.append("\t\t" + tempItem.getKey() + "\n"); diff --git a/tools/unicodetools/com/ibm/rbm/RBReporterScanner.java b/tools/unicodetools/com/ibm/rbm/RBReporterScanner.java index 4ed340c6d70..5617de9eddc 100644 --- a/tools/unicodetools/com/ibm/rbm/RBReporterScanner.java +++ b/tools/unicodetools/com/ibm/rbm/RBReporterScanner.java @@ -1,6 +1,6 @@ /* ***************************************************************************** - * Copyright (C) 2000-2004, International Business Machines Corporation and * + * Copyright (C) 2000-2007, International Business Machines Corporation and * * others. All Rights Reserved. * ***************************************************************************** */ @@ -48,9 +48,9 @@ public class RBReporterScanner { parseRules = getParseRules(root); results = new Hashtable(); - Enumeration enum = bundle.allItems.keys(); - while (enum.hasMoreElements()) { - String key = (String)enum.nextElement(); + Enumeration keys = bundle.allItems.keys(); + while (keys.hasMoreElements()) { + String key = (String)keys.nextElement(); BundleItem item = (BundleItem)bundle.allItems.get(key); results.put(key, new ScanResult(item)); } @@ -68,26 +68,27 @@ public class RBReporterScanner { protected int getNumberUnusedResources() { int count = 0; - Enumeration enum = results.elements(); - while (enum.hasMoreElements()) { - ScanResult result = (ScanResult)enum.nextElement(); + Enumeration elems = results.elements(); + while (elems.hasMoreElements()) { + ScanResult result = (ScanResult)elems.nextElement(); if (result.getOccurances().size() < 1) count++; } return count; } protected Vector getMissingResources() { - Enumeration enum = missing.elements(); + Enumeration elems = missing.elements(); Vector v = new Vector(); - while (enum.hasMoreElements()) v.addElement(enum.nextElement()); + while (elems.hasMoreElements()) + v.addElement(elems.nextElement()); return v; } protected Vector getUnusedResources() { - Enumeration enum = results.elements(); + Enumeration elems = results.elements(); Vector v = new Vector(); - while (enum.hasMoreElements()) { - ScanResult result = (ScanResult)enum.nextElement(); + while (elems.hasMoreElements()) { + ScanResult result = (ScanResult)elems.nextElement(); if (result.getOccurances().size() < 1) { v.addElement(result); } diff --git a/tools/unicodetools/com/ibm/rbm/RBTMXExporter.java b/tools/unicodetools/com/ibm/rbm/RBTMXExporter.java index ac86c4f0eaa..80aedaa8f3b 100644 --- a/tools/unicodetools/com/ibm/rbm/RBTMXExporter.java +++ b/tools/unicodetools/com/ibm/rbm/RBTMXExporter.java @@ -1,6 +1,6 @@ /* ***************************************************************************** - * Copyright (C) 2000-2004, International Business Machines Corporation and * + * Copyright (C) 2000-2007, International Business Machines Corporation and * * others. All Rights Reserved. * ***************************************************************************** */ @@ -115,9 +115,9 @@ public class RBTMXExporter extends RBExporter { tuv.appendChild(translated_prop); Hashtable lookups = item.getLookups(); - Enumeration enum = lookups.keys(); - while (enum.hasMoreElements()) { - String key = (String)enum.nextElement(); + Enumeration keys = lookups.keys(); + while (keys.hasMoreElements()) { + String key = (String)keys.nextElement(); String value = (String)lookups.get(key); Element lookup_prop = xml.createElement("prop"); lookup_prop.appendChild(xml.createTextNode(key + "=" + value)); diff --git a/tools/unicodetools/com/ibm/rbm/RBTMXImporter.java b/tools/unicodetools/com/ibm/rbm/RBTMXImporter.java index 1613c6913c0..fdc8d63748f 100644 --- a/tools/unicodetools/com/ibm/rbm/RBTMXImporter.java +++ b/tools/unicodetools/com/ibm/rbm/RBTMXImporter.java @@ -1,6 +1,6 @@ /* ***************************************************************************** - * Copyright (C) 2000-2004, International Business Machines Corporation and * + * Copyright (C) 2000-2007, International Business Machines Corporation and * * others. All Rights Reserved. * ***************************************************************************** */ @@ -232,9 +232,9 @@ public class RBTMXImporter extends RBImporter { } } Vector v = new Vector(); - Enumeration enum = hash.keys(); - while (enum.hasMoreElements()) { - v.addElement(enum.nextElement()); + Enumeration keys = hash.keys(); + while (keys.hasMoreElements()) { + v.addElement(keys.nextElement()); } return v; } diff --git a/tools/unicodetools/com/ibm/rbm/gui/BundleItemCreationDialog.java b/tools/unicodetools/com/ibm/rbm/gui/BundleItemCreationDialog.java index d2372b0430c..4333bad71a7 100644 --- a/tools/unicodetools/com/ibm/rbm/gui/BundleItemCreationDialog.java +++ b/tools/unicodetools/com/ibm/rbm/gui/BundleItemCreationDialog.java @@ -1,6 +1,6 @@ /* ***************************************************************************** - * Copyright (C) 2000-2004, International Business Machines Corporation and * + * Copyright (C) 2000-2007, International Business Machines Corporation and * * others. All Rights Reserved. * ***************************************************************************** */ @@ -207,9 +207,9 @@ class BundleItemCreationDialog extends JDialog { } } // Remove old lookups if necessary - Enumeration enum = lookups.keys(); - while (enum.hasMoreElements()) { - String name = (String)enum.nextElement(); + Enumeration keys = lookups.keys(); + while (keys.hasMoreElements()) { + String name = (String)keys.nextElement(); if (currentTrans.indexOf("{" + name + "}") < 0) { lookups.remove(name); } @@ -235,9 +235,9 @@ class BundleItemCreationDialog extends JDialog { lookupFields = new JTextField[lookups.size()]; lookupLabels = new JLabel[lookups.size()]; int count = 0; - enum = lookups.keys(); - while (enum.hasMoreElements()) { - String name = (String)enum.nextElement(); + keys = lookups.keys(); + while (keys.hasMoreElements()) { + String name = (String)keys.nextElement(); String value = (String)lookups.get(name); RBManagerGUI.debugMsg("Lookup: " + name + " -> " + value); RBManagerGUI.debugMsg(lookups.toString()); diff --git a/tools/unicodetools/com/ibm/rbm/gui/BundleItemDialog.java b/tools/unicodetools/com/ibm/rbm/gui/BundleItemDialog.java index 3533d7438f8..52ec5ce304f 100644 --- a/tools/unicodetools/com/ibm/rbm/gui/BundleItemDialog.java +++ b/tools/unicodetools/com/ibm/rbm/gui/BundleItemDialog.java @@ -1,6 +1,6 @@ /* ***************************************************************************** - * Copyright (C) 2000-2004, International Business Machines Corporation and * + * Copyright (C) 2000-2007, International Business Machines Corporation and * * others. All Rights Reserved. * ***************************************************************************** */ @@ -152,9 +152,9 @@ class BundleItemDialog extends JDialog implements ActionListener { lookups = new Box[item.getLookups().size()]; lookupLabels = new JLabel[item.getLookups().size()]; lookupFields = new JTextField[item.getLookups().size()]; - Enumeration enum = item.getLookups().keys(); + Enumeration keys = item.getLookups().keys(); for (int i = 0; i < item.getLookups().size(); i++) { - String name = (String)enum.nextElement(); + String name = (String)keys.nextElement(); String value = (String)item.getLookups().get(name); RBManagerGUI.debugMsg("X - Lookup: " + name + " -> " + value); lookups[i] = new Box(BoxLayout.X_AXIS); diff --git a/tools/unicodetools/com/ibm/rbm/gui/RBSearchPanel.java b/tools/unicodetools/com/ibm/rbm/gui/RBSearchPanel.java index a4e04dcfcf2..1c7fd5005b6 100644 --- a/tools/unicodetools/com/ibm/rbm/gui/RBSearchPanel.java +++ b/tools/unicodetools/com/ibm/rbm/gui/RBSearchPanel.java @@ -1,6 +1,6 @@ /* ***************************************************************************** - * Copyright (C) 2000-2004, International Business Machines Corporation and * + * Copyright (C) 2000-2007, International Business Machines Corporation and * * others. All Rights Reserved. * ***************************************************************************** */ @@ -90,9 +90,9 @@ class RBSearchPanel extends JPanel { private void performSearch(String term, Bundle bundle, boolean case_sensitive) { Vector ret_v = new Vector(); - Enumeration enum = bundle.allItems.keys(); - while (enum.hasMoreElements()) { - String key = (String)enum.nextElement(); + Enumeration keys = bundle.allItems.keys(); + while (keys.hasMoreElements()) { + String key = (String)keys.nextElement(); BundleItem item = (BundleItem)bundle.allItems.get(key); if (case_sensitive) { if (keysCheck.isSelected() && key.indexOf(term) >= 0) {