Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mddi-dev] ModelBusStudio Code Generation question

Tom Ritter a écrit :
Hi Johan,


johan.ponin wrote:
Hi,

I'm not sure it's the best place to ask about ModelBusStudio ... but I have some issues regarding the code generation in it.

It is definitely the right place to ask, even if ModelBus Studio is not already part of MDDi code base. (But it will be soon)

Partly we could reproduce, what you described. To really identify the problem it would be nice if you could send us also the (hand made) description files and the meta classes.

Many thanks,
  Tom

Oh sorry, I made a mistake in the previous answer and inserted a wrong .description file. here are the good ones :

first ( working one ) :

<?xml version="1.0" encoding="UTF-8"?>
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:abstract="http://modelbus/description/abstract"; xmlns:concrete="http://modelbus/description/concrete"; xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"; xmlns:tooldescription="http://modelbus/description";>
 <tooldescription:ModelBusPackaging name="aaa">
<content xsi:type="tooldescription:ModelBusPackaging" name="ElementaryTypes">
     <content xsi:type="abstract:PrimitiveType" name="Integer"/>
     <content xsi:type="abstract:PrimitiveType" name="String"/>
     <content xsi:type="abstract:PrimitiveType" name="Boolean"/>
     <content xsi:type="abstract:PrimitiveType" name="Double"/>
   </content>
   <content xsi:type="tooldescription:ModelBusPackaging" name="ModelTypes">
     <content xsi:type="abstract:ModelType" name="ModelType"/>
     <content xsi:type="abstract:ModelType" name="UMLModelType"/>
   </content>
<content xsi:type="concrete:Tool" name="ModelTool" interface="/0/@content.4" platform="Any"/>
   <content xsi:type="abstract:ModelingServiceInterface" name="Uml">
     <service name="createUmlPackage">
       <parameter name="name" type="/0/@content.0/@content.1"/>
<parameter name="package" type="/0/@content.1/@content.1" direction="return"/>
     </service>
     <service name="appendUmlClass">
       <parameter name="className" type="/0/@content.0/@content.1"/>
<parameter name="package" type="/0/@content.1/@content.1" direction="inout"/>
     </service>
   </content>
   <content xsi:type="abstract:ModelingServiceInterface" name="Model">
     <service name="modelRootName">
       <parameter name="model" type="/0/@content.5"/>
<parameter name="name" type="/0/@content.0/@content.1" direction="return"/>
     </service>
     <service name="InPlaceUpdate">
<parameter name="model" type="/0/@content.1/@content.0" direction="inout"/>
     </service>
   </content>
   <content xsi:type="abstract:ModelType" name="SpecificModel">
     <content name="modelClass" metaClass="/1/Class" lower="1" upper="1"/>
   </content>
 </tooldescription:ModelBusPackaging>
<ecore:EPackage name="MetaClasses" nsURI="ModelToolProject3" nsPrefix="mtp">
   <eClassifiers xsi:type="ecore:EClass" name="Class">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="/1/String"/>
   </eClassifiers>
<eClassifiers xsi:type="ecore:EDataType" name="String" instanceClassName="java.lang.String"/>
 </ecore:EPackage>
</xmi:XMI>

second file :

<?xml version="1.0" encoding="UTF-8"?>
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:abstract="http://modelbus/description/abstract"; xmlns:concrete="http://modelbus/description/concrete"; xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"; xmlns:tooldescription="http://modelbus/description";>
 <tooldescription:ModelBusPackaging>
<content xsi:type="tooldescription:ModelBusPackaging" name="ElementaryTypes">
     <content xsi:type="abstract:PrimitiveType" name="Integer"/>
     <content xsi:type="abstract:PrimitiveType" name="String"/>
     <content xsi:type="abstract:PrimitiveType" name="Boolean"/>
     <content xsi:type="abstract:PrimitiveType" name="Double"/>
   </content>
   <content xsi:type="tooldescription:ModelBusPackaging" name="ModelTypes">
     <content xsi:type="abstract:ModelType" name="ModelType"/>
     <content xsi:type="abstract:ModelType" name="UMLModelType"/>
   </content>
<content xsi:type="tooldescription:ModelBusPackaging" name="ModelToolTypes">
     <content xsi:type="abstract:ModelType" name="Validation">
       <content name="YAMC" metaClass="/1/Return" lower="1" upper="1"/>
     </content>
   </content>
<content xsi:type="concrete:Tool" name="YMTTool" interface="/0/@content.4" platform="win32"/>
   <content xsi:type="abstract:ModelingServiceInterface" name="YMI">
     <service name="check">
       <parameter name="umlModel" type="/0/@content.1/@content.1"/>
<parameter name="result" type="/0/@content.2/@content.0" direction="return"/>
     </service>
   </content>
 </tooldescription:ModelBusPackaging>
 <ecore:EPackage name="YmtTool" nsURI="ymtUri" nsPrefix="ymt">
   <eClassifiers xsi:type="ecore:EClass" name="Return">
<eStructuralFeatures xsi:type="ecore:EReference" name="rest" upperBound="-1" eType="/1/Rest" containment="true"/>
   </eClassifiers>
   <eClassifiers xsi:type="ecore:EClass" name="Rest">
<eStructuralFeatures xsi:type="ecore:EReference" name="modelElement" upperBound="-1"> <eType xsi:type="ecore:EClass" href="../../plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EModelElement"/>
     </eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="severity" lowerBound="1" eType="/1/Severity" defaultValueLiteral=""/> <eStructuralFeatures xsi:type="ecore:EReference" name="desc" lowerBound="1" eType="/1/Desc" containment="true"/>
   </eClassifiers>
   <eClassifiers xsi:type="ecore:EClass" name="Desc">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="content" lowerBound="1"> <eType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
     </eStructuralFeatures>
   </eClassifiers>
   <eClassifiers xsi:type="ecore:EEnum" name="Severity">
     <eLiterals name="error"/>
     <eLiterals name="warning" value="1"/>
     <eLiterals name="static" value="2"/>
   </eClassifiers>
 </ecore:EPackage>
</xmi:XMI>

Sorry again, bye


Back to the top