svn commit: r13789 - trunk/src_new/org/argouml/uml: . profile

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: mvw
Date: 2007-11-18 09:48:18-0800
New Revision: 13789

Modified:
   trunk/src_new/org/argouml/uml/StereotypeUtility.java
   trunk/src_new/org/argouml/uml/profile/ProfileConfiguration.java

Log:
Two fixes for issue 4908: exception when editing notation for stereotypes of an operation.

Modified: trunk/src_new/org/argouml/uml/StereotypeUtility.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/uml/StereotypeUtility.java?view=diff&rev=13789&p1=trunk/src_new/org/argouml/uml/StereotypeUtility.java&p2=trunk/src_new/org/argouml/uml/StereotypeUtility.java&r1=13788&r2=13789
==============================================================================
--- trunk/src_new/org/argouml/uml/StereotypeUtility.java	(original)
+++ trunk/src_new/org/argouml/uml/StereotypeUtility.java	2007-11-18 09:48:18-0800
@@ -310,10 +310,9 @@
         }
 
         // add stereotypes
-        if (!stereotypes.isEmpty()) {
-            Iterator i = stereotypes.iterator();
-            while (i.hasNext()) {
-                String stereotypename = (String) i.next();
+        for (String stereotypename : stereotypes) {
+            if (!Model.getExtensionMechanismsHelper()
+                    .hasStereotype(umlobject, stereotypename)) {
                 Object umlstereo = getStereotype(umlobject, stereotypename);
                 if (umlstereo != null) {
                     Model.getCoreHelper().addStereotype(umlobject, umlstereo);

Modified: trunk/src_new/org/argouml/uml/profile/ProfileConfiguration.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/uml/profile/ProfileConfiguration.java?view=diff&rev=13789&p1=trunk/src_new/org/argouml/uml/profile/ProfileConfiguration.java&p2=trunk/src_new/org/argouml/uml/profile/ProfileConfiguration.java&r1=13788&r2=13789
==============================================================================
--- trunk/src_new/org/argouml/uml/profile/ProfileConfiguration.java	(original)
+++ trunk/src_new/org/argouml/uml/profile/ProfileConfiguration.java	2007-11-18 09:48:18-0800
@@ -289,7 +289,7 @@
 

                 if (Model.getExtensionMechanismsHelper().isValidStereotype(

                         element, stereo)) {

-                    return element;

+                    return stereo;

                 }

             }

         }
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.