svn commit: r18410 - trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/FacadeEUMLImpl.java

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: thn
Date: 2010-06-02 02:26:25-0700
New Revision: 18410

Modified:
   trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/FacadeEUMLImpl.java

Log:
UML2: correct check for assoc ends; avoid adding null names to list of base classes

Modified: trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/FacadeEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/FacadeEUMLImpl.java?view=diff&pathrev=18410&r1=18409&r2=18410
==============================================================================
--- trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/FacadeEUMLImpl.java	(original)
+++ trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/FacadeEUMLImpl.java	2010-06-02 02:26:25-0700
@@ -253,8 +253,8 @@
             throw new IllegalArgumentException(
                     "association must be Association"); //$NON-NLS-1$
         }
-        for (Property p : UMLUtil.getOwnedAttributes((Classifier) classifier)) {
-            if (p.getAssociation() == association) {
+        for (Property p : ((Association) association).getOwnedEnds()) {
+            if (p.getType() == classifier && p.getAssociation() == association) {
                 return p;
             }
         }
@@ -312,10 +312,12 @@
         Collection<String> result = new ArrayList<String>();
         for (org.eclipse.uml2.uml.Class metaclass 
                 : ((Stereotype) handle).getAllExtendedMetaclasses()) {
-            result.add(metaclass.getName());
+            if (metaclass.getName() != null) {
+                result.add(metaclass.getName());
             }
-        return result;
         }
+        return result;
+    }
 
     public Collection getBases(Object handle) {
         throw new NotYetImplementedException();

------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=2615881

To unsubscribe from this discussion, e-mail: [[email protected]].
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.