[Uml-devel] kdesdk/umbrello/umbrello

Oliver Kellogg okellogg at users.sourceforge.net
Mon Nov 8 23:02:06 UTC 2004


CVS commit by okellogg: 

>From Marcus Alanen (maalanen_AT_ra.abo.fi):
<quote>
 UML Operation's parameters should be wrapped inside a 
 "UML:BehavioralFeature.parameter" XML element, like this:

      <UML:Operation xmi.id="e7" ...>
       <UML:BehavioralFeature.parameter>
        <UML:Parameter ...>
        <UML:Parameter ...>
        <UML:Parameter ...>
       </UML:BehavioralFeature.parameter>
      </UML:Operation>
</quote>


  M +5 -2      operation.cpp   1.35


--- kdesdk/umbrello/umbrello/operation.cpp  #1.34:1.35
@@ -235,4 +235,5 @@ bool UMLOperation::resolveRef() {
 void UMLOperation::saveToXMI( QDomDocument & qDoc, QDomElement & qElement ) {
         QDomElement operationElement = UMLObject::save("UML:Operation", qDoc);
+        QDomElement featureElement = qDoc.createElement( "UML:BehavioralFeature.parameter" );
         if (m_pSecondary) {
                 //operationElement.setAttribute( "type", ID2STR(m_pSecondary->getID()) );
@@ -243,5 +244,5 @@ void UMLOperation::saveToXMI( QDomDocume
                         retElement.setAttribute( "type", ID2STR(m_pSecondary->getID()) );
                         retElement.setAttribute( "kind", "return" );
-                        operationElement.appendChild( retElement );
+                        featureElement.appendChild( retElement );
                 }
         } else {
@@ -269,6 +270,8 @@ void UMLOperation::saveToXMI( QDomDocume
                 // The default for the parameter kind is "in".
 
-                operationElement.appendChild( attElement );
+                featureElement.appendChild( attElement );
         }
+        if (featureElement.hasChildNodes())
+                operationElement.appendChild( featureElement );
         qElement.appendChild( operationElement );
 }






More information about the umbrello-devel mailing list