svn commit: r15897 - trunk/src/argouml-app/src/org/argouml/notation/providers/uml/NotationUtilityUml.java

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: mvw
Date: 2008-10-07 01:44:59-0700
New Revision: 15897

Modified:
   trunk/src/argouml-app/src/org/argouml/notation/providers/uml/NotationUtilityUml.java

Log:
Fix for issue 5235: UML1.4 notation doesn't parse frozen in attribute.

Modified: trunk/src/argouml-app/src/org/argouml/notation/providers/uml/NotationUtilityUml.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/notation/providers/uml/NotationUtilityUml.java?view=diff&rev=15897&p1=trunk/src/argouml-app/src/org/argouml/notation/providers/uml/NotationUtilityUml.java&p2=trunk/src/argouml-app/src/org/argouml/notation/providers/uml/NotationUtilityUml.java&r1=15896&r2=15897
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/notation/providers/uml/NotationUtilityUml.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/notation/providers/uml/NotationUtilityUml.java	2008-10-07 01:44:59-0700
@@ -114,10 +114,15 @@
                 new PropertyOperation() {
                     public void found(Object element, String value) {
                         if (Model.getFacade().isAStructuralFeature(element)) {
-                            if ("false".equalsIgnoreCase(value)) {
+                            if (value == null) { 
+                                /* the text was: {frozen} */
                                 Model.getCoreHelper().setReadOnly(element, true);
-                            } else {
+                            } else if ("false".equalsIgnoreCase(value)) {
+                                /* the text was: {frozen = false} */
                                 Model.getCoreHelper().setReadOnly(element, false);
+                            } else if ("true".equalsIgnoreCase(value)) {
+                                /* the text was: {frozen = true} */
+                                Model.getCoreHelper().setReadOnly(element, true);
                             }
                         }
                     }
@@ -728,6 +733,8 @@
                 value = value.trim();
             }
 
+            /* If the current property occurs a second time
+             * in the given list of properties, then skip it: */
             for (j = i + 2; j < prop.size(); j += 2) {
                 String s = prop.get(j);
                 if (s != null && name.equalsIgnoreCase(s.trim())) {
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.