[
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
Hi,
so glad you already answered, here is the .description of the working
project : ( metaclasses are defined in the same .description 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 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>
here is the other 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>
<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" lower="1" upper="1">
<metaClass
href="/EPackage[@name='YTMTool']/eClassifiers[@name='Return']"/>
</content>
</content>
</content>
<content xsi:type="concrete:Tool" name="YMTTool"
interface="//@content.4" platform="win32"/>
<content xsi:type="abstract:ModelingServiceInterface" name="YMI">
<service name="check">
<parameter name="umlModel" type="//@content.1/@content.1"/>
<parameter name="result" type="//@content.2/@content.0"
direction="return"/>
</service>
</content>
</tooldescription:ModelBusPackaging>
<ecore:EPackage name="YTMTool" nsURI="ns.lip6" nsPrefix="ns.lip6">
<eClassifiers xsi:type="ecore:EClass" name="Return">
<eStructuralFeatures xsi:type="ecore:EReference"
name="rest"
upperBound="-1"
containment="true"
eType="#//Rest" />
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Rest">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="severity"
eType="#//Severity"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="desc"
lowerBound="1" eType="#//Desc"
containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="modelElement"
upperBound="-1"
eType="ecore:EClass
platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EModelElement"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Desc">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="content"
lowerBound="1"
eType="ecore:EDataType
http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</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>
Regards