Author: mvw
Date: 2008-03-30 06:44:48-0700
New Revision: 14263

Modified:
   trunk/src/app/src/org/argouml/uml/diagram/static_structure/ui/FigClass.java

Log:
No need to listen to the namespaces in the path - the notation handles this 
already.

Java 5 loops.

Modified: 
trunk/src/app/src/org/argouml/uml/diagram/static_structure/ui/FigClass.java
Url: 
http://argouml.tigris.org/source/browse/argouml/trunk/src/app/src/org/argouml/uml/diagram/static_structure/ui/FigClass.java?view=diff&rev=14263&p1=trunk/src/app/src/org/argouml/uml/diagram/static_structure/ui/FigClass.java&p2=trunk/src/app/src/org/argouml/uml/diagram/static_structure/ui/FigClass.java&r1=14262&r2=14263
==============================================================================
--- trunk/src/app/src/org/argouml/uml/diagram/static_structure/ui/FigClass.java 
(original)
+++ trunk/src/app/src/org/argouml/uml/diagram/static_structure/ui/FigClass.java 
2008-03-30 06:44:48-0700
@@ -693,9 +693,7 @@
             Collection c = new ArrayList(
                     Model.getFacade().getStereotypes(newOwner));
             // and its features
-            Iterator it = Model.getFacade().getFeatures(newOwner).iterator();
-            while (it.hasNext()) {
-                Object feat = it.next();
+            for (Object feat : Model.getFacade().getFeatures(newOwner)) {
                 c.add(feat);
                 // and the stereotypes of its features
                 c.addAll(new 
ArrayList(Model.getFacade().getStereotypes(feat)));
@@ -704,18 +702,9 @@
                     c.addAll(Model.getFacade().getParameters(feat));
                 }
             }
-            Iterator it2 = c.iterator();
-            while (it2.hasNext()) {
-                addElementListener(it2.next());
-            }
-            if (isPathVisible()) {
-                c = Model.getModelManagementHelper()
-                    .getAllSurroundingNamespaces(newOwner);
-                Iterator itpv = c.iterator();
-                while (itpv.hasNext()) {
-                    addElementListener(itpv.next(), 
-                            new String[] {"name", "namespace", 
"ownedElement"});
-                }
+            // And now add listeners to them all:
+            for (Object obj : c) {
+                addElementListener(obj);
             }
         }
     }

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to