svn commit: r14264 - trunk/src/app/src/org/argouml/uml/diagram/static_structure/ui/FigInterface.java

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: mvw
Date: 2008-03-30 06:47:07-0700
New Revision: 14264

Modified:
   trunk/src/app/src/org/argouml/uml/diagram/static_structure/ui/FigInterface.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/FigInterface.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/app/src/org/argouml/uml/diagram/static_structure/ui/FigInterface.java?view=diff&rev=14264&p1=trunk/src/app/src/org/argouml/uml/diagram/static_structure/ui/FigInterface.java&p2=trunk/src/app/src/org/argouml/uml/diagram/static_structure/ui/FigInterface.java&r1=14263&r2=14264
==============================================================================
--- trunk/src/app/src/org/argouml/uml/diagram/static_structure/ui/FigInterface.java	(original)
+++ trunk/src/app/src/org/argouml/uml/diagram/static_structure/ui/FigInterface.java	2008-03-30 06:47:07-0700
@@ -421,9 +421,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)));
@@ -432,18 +430,8 @@
                     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"});
-                }
+            for (Object obj : c) {
+                addElementListener(obj);
             }
         }
     }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.