I've gone full circle here and have actually come back to where
Alexander started.
I decided to look at what some other UML tools were doing
They all seem to be providing the screen controls as Alexander described
An editable name
A picklist of types which is a list of classifiers (not mandatory)
A default value which is just an editable field.
So I wanted to know what they actually create in the model when these
are selected
Unfortunately the only UML1.4 tool I can find at the moment is
MagicDraw 9.5. I create a templated class using that with 2
TemplateParameters (T, k Integer = 100)
i.e.
1. Name = T (all other fields blank or unselected)
2. Name = k Type = Integer default=100
The result is the XMI fragment below
<UML:Class xmi.id='_9_5_1_2090114_1260787351255_294667_1'
name='TheClass'>
<UML:ModelElement.templateParameter>
<UML:TemplateParameter
xmi.id='_9_5_1_2090114_1260787523345_766393_19'>
<UML:TemplateParameter.parameter>
<UML:Parameter
xmi.id='_9_5_1_2090114_1260787570714_688321_22' name='T'/>
</UML:TemplateParameter.parameter>
</UML:TemplateParameter>
<UML:TemplateParameter
xmi.id='_9_5_1_2090114_1260787523345_952388_20'>
<UML:TemplateParameter.defaultElement>
<UML:ModelElement
xmi.idref='_9_5_1_2090114_1260787518144_705817_18'/>
</UML:TemplateParameter.defaultElement>
<UML:TemplateParameter.parameter>
<UML:Parameter
xmi.id='_9_5_1_2090114_1260787570714_401944_23' name='k'>
<UML:Parameter.type>
<UML:Classifier
href='UML_Standard_Profile.xml|donce_1051693917650_319078_0'>
<XMI.extension
xmi.extender='MagicDraw UML 9.5'
xmi.extenderID='MagicDraw UML 9.5'>
<referentPath xmi.value='UML Standard Profile::Integer'/>
</XMI.extension>
</UML:Classifier>
</UML:Parameter.type>
</UML:Parameter>
</UML:TemplateParameter.parameter>
</UML:TemplateParameter>
</UML:ModelElement.templateParameter>
</UML:Class>
<UML:DataValue xmi.id='_9_5_1_2090114_1260787518144_705817_18'
name='100'/>
So they use Parameter as the parameter, not Class, Interface or Classifier.
I propose to go back to this as a solution. If it worked for MD it
should be good enough for us.
Alexander - what was your inspiration to use Parameter all that time
ago? Was that a comparison with some other tool?
It seems the template stuff has changed in UML2 so I'd rather not
spend more time trying to work out why this may not seem to match
exactly with my interpretation of the UML1.4 spec but get something to
work as well as MD managed for UML1.4 and then be able to get back to
UML2 work.
Lets not forget template binding. Did you do any work for the Alexander?
Bob.
------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=450&dsMessageId=2430241
To unsubscribe from this discussion, e-mail:
[[email protected]].
To be allowed to post to the list contact the mailing list moderator, email:
[[email protected]]