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

Bob Tarling <[email protected]>
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: bobtarling
Date: 2009-12-17 11:18:35-0800
New Revision: 17657

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

Log:
Special case for name of TemplateParameter - which is actually name of TemplateParameters parameter

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=17657&r1=17656&r2=17657
==============================================================================
--- 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	2009-12-17 11:18:35-0800
@@ -543,10 +543,13 @@
     private void buildTextboxPanel(JPanel panel, Object target,
             PropertyMeta prop) {
        
-        JTextField tfield = null;
         UMLPlainTextDocument document = null;
         if ("name".equals(prop.getName())) {
-            document = new UMLModelElementNameDocument(prop.getName(), target);
+            if (Model.getFacade().isATemplateParameter(target)) {
+                document = new UMLModelElementNameDocument(prop.getName(), Model.getFacade().getParameter(target));
+            } else {
+                document = new UMLModelElementNameDocument(prop.getName(), target);
+            } 
         } else if ("discriminator".equals(prop.getName())) {
             document = new UMLDiscriminatorNameDocument(prop.getName(), target);
         } else if ("location".equals(prop.getName())) {
@@ -556,11 +559,7 @@
         }
         
         if (document != null) {
-            document.setTarget(target);
-            tfield = new UMLTextField2(document);
-        }
-        
-        if (tfield != null) {
+            JTextField tfield = new UMLTextField2(document);
             addControl(panel, prop.getName(), tfield);
         }
     }

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

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.