svn commit: r13162 - trunk/src_new/org/argouml/uml/ui/foundation/extension_mechanisms/UMLTagDefinitionComboBoxModel.java
[email protected] 27 Jul 2007 21:08:23 -0000
Newsgroups
gmane.comp.lang.uml.argouml.cvs
Message-ID
<[email protected] >
Author: tfmorris
Date: 2007-07-27 14:08:23-0700
New Revision: 13162
Modified:
trunk/src_new/org/argouml/uml/ui/foundation/extension_mechanisms/UMLTagDefinitionComboBoxModel.java
Log:
Java 5 loops
Modified: trunk/src_new/org/argouml/uml/ui/foundation/extension_mechanisms/UMLTagDefinitionComboBoxModel.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/uml/ui/foundation/extension_mechanisms/UMLTagDefinitionComboBoxModel.java?view=diff&rev=13162&p1=trunk/src_new/org/argouml/uml/ui/foundation/extension_mechanisms/UMLTagDefinitionComboBoxModel.java&p2=trunk/src_new/org/argouml/uml/ui/foundation/extension_mechanisms/UMLTagDefinitionComboBoxModel.java&r1=13161&r2=13162
==============================================================================
--- trunk/src_new/org/argouml/uml/ui/foundation/extension_mechanisms/UMLTagDefinitionComboBoxModel.java (original)
+++ trunk/src_new/org/argouml/uml/ui/foundation/extension_mechanisms/UMLTagDefinitionComboBoxModel.java 2007-07-27 14:08:23-0700
@@ -29,6 +29,7 @@
import java.util.Comparator;
import java.util.HashSet;
import java.util.Iterator;
+import java.util.List;
import java.util.Set;
import java.util.TreeSet;
@@ -107,22 +108,18 @@
});
Collection stereotypes = Model.getFacade().getStereotypes(t);
Project project = ProjectManager.getManager().getCurrentProject();
- Collection models = project.getModels();
- Iterator it = models.iterator();
- while (it.hasNext()) {
+ for (Object model : project.getModels()) {
addAllUniqueModelElementsFrom(availableTagDefs, paths,
Model.getModelManagementHelper().getAllModelElementsOfKind(
- it.next(),
+ model,
Model.getMetaTypes().getTagDefinition()));
}
addAllUniqueModelElementsFrom(availableTagDefs, paths,
Model.getModelManagementHelper().getAllModelElementsOfKind(
project.getDefaultModel(),
Model.getMetaTypes().getTagDefinition()));
- ArrayList notValids = new ArrayList();
- it = availableTagDefs.iterator();
- while (it.hasNext()) {
- Object tagDef = it.next();
+ List notValids = new ArrayList();
+ for (Object tagDef : availableTagDefs) {
Object owner = Model.getFacade().getOwner(tagDef);
if (owner != null && !stereotypes.contains(owner)) {
notValids.add(tagDef);