svn commit: r17634 - trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/UmlFactoryMDRImpl.java

Bob Tarling <[email protected]>
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: bobtarling
Date: 2009-12-10 16:56:28-0800
New Revision: 17634

Modified:
   trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/UmlFactoryMDRImpl.java

Log:
Replace Alexanders old code to create TemplateParameter

Modified: trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/UmlFactoryMDRImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/UmlFactoryMDRImpl.java?view=diff&pathrev=17634&r1=17633&r2=17634
==============================================================================
--- trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/UmlFactoryMDRImpl.java	(original)
+++ trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/UmlFactoryMDRImpl.java	2009-12-10 16:56:28-0800
@@ -594,6 +594,17 @@
         } else if (elementType == this.metaTypes.getExtensionPoint()) {
             element = this.modelImpl.getUseCasesFactory().
                 buildExtensionPoint(container);            
+        } else if (elementType == this.metaTypes.getTemplateParameter()) {
+            // TODO: the type of the model element used in a type parameter
+            // (ie the formal) needs to match the actual parameter that it
+            // gets replaced with later.  This code is going to restrict that
+            // to always being a Parameter which doesn't seem right, but I
+            // don't have time to debug it right now. - tfm - 20090608
+            Parameter param = getCore().createParameter();
+            param.setName("T"); // default parameter name
+            element = 
+                modelImpl.getCoreFactory().buildTemplateParameter(container, 
+                        param, null);            
         } else {
             // build all other elements using existing buildNode
             element = buildNode(elementType);

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

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.