svn commit: r18328 - trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/CoreHelperEUMLImpl.java

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: thn
Date: 2010-04-23 00:38:56-0700
New Revision: 18328

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

Log:
multiplicities: allow for parsing "x_y"

Modified: trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/CoreHelperEUMLImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/CoreHelperEUMLImpl.java?view=diff&pathrev=18328&r1=18327&r2=18328
==============================================================================
--- trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/CoreHelperEUMLImpl.java	(original)
+++ trunk/src/argouml-core-model-euml/src/org/argouml/model/euml/CoreHelperEUMLImpl.java	2010-04-23 00:38:56-0700
@@ -1514,6 +1514,19 @@
                 } else {
                     upper = Integer.parseInt(pieces[1]);
                 }
+            } else if (s.contains("_")) { //$NON-NLS-1$
+                // also parse 1_* or 0_N etc.
+                String[] pieces = s.trim().split("_"); //$NON-NLS-1$
+                if (pieces.length > 2) {
+                    throw new IllegalArgumentException((String) arg);
+                }
+                lower = Integer.parseInt(pieces[0]);
+                if ("*".equals(pieces[1]) //$NON-NLS-1$
+                     || "N".equals(pieces[1])) { //$NON-NLS-1$
+                    upper = -1;
+                } else {
+                    upper = Integer.parseInt(pieces[1]);
+                }
             } else { 
                 lower = Integer.parseInt(s);
                 upper = lower;

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

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.