svn commit: r19173 - trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/SwingUIFactory.java

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: thn
Date: 2011-04-01 07:58:34-0700
New Revision: 19173

Modified:
   trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/SwingUIFactory.java

Log:
UML2: for initial value, use the new UMLValueSpecificationXXX classes instead of the UMLExpressionXXX classes
(step backward, the new classes need to be enhanced)

Modified: trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/SwingUIFactory.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/SwingUIFactory.java?view=diff&pathrev=19173&r1=19172&r2=19173
==============================================================================
--- trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/SwingUIFactory.java	(original)
+++ trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/SwingUIFactory.java	2011-04-01 07:58:34-0700
@@ -216,10 +216,16 @@
         final TitledBorder border = new TitledBorder(propertyName);        
         p.setBorder(border);
 
-        if ("initialValue".equals(propertyName)) {        
-            UMLExpressionModel model = 
-                new UMLInitialValueExpressionModel(target);
-            p  = new UMLExpressionPanel(model, propertyName);
+        if ("initialValue".equals(propertyName)) {
+            if (Model.getFacade().getUmlVersion().charAt(0) == '1') {
+                UMLExpressionModel model = 
+                    new UMLInitialValueExpressionModel(target);
+                p  = new UMLExpressionPanel(model, propertyName);
+            } else {
+        	UMLValueSpecificationModel model = 
+                    new UMLValueSpecificationModel(target, "initialValue");
+                p  = new UMLValueSpecificationPanel(model, propertyName);
+            }
             control = p;
         } else if ("defaultValue".equals(propertyName)) {
             UMLExpressionModel model =

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

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.