svn commit: r18701 - 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: bobtarling
Date: 2010-08-28 05:56:58-0700
New Revision: 18701

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

Log:
Allow multiplicity to be set to null

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=18701&r1=18700&r2=18701
==============================================================================
--- 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-08-28 05:56:58-0700
@@ -1527,7 +1527,18 @@
     }
 
     public void setMultiplicity(final Object handle, Object arg) {
-        if (arg == null) {
+        if (arg == null || arg.equals("")) {
+            RunnableClass run = new RunnableClass() {
+                public void run() {
+                    ((MultiplicityElement) handle).setLowerValue(null);
+                    ((MultiplicityElement) handle).setUpperValue(null);
+                }
+            };
+            editingDomain.getCommandStack().execute(
+                    new ChangeCommand(
+                            modelImpl, run,
+                            "Removing the multiplicity from element #", //$NON-NLS-1$
+                            handle));
             return;
         }
         if (!(handle instanceof MultiplicityElement)) {

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

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.