[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.mdt.uml2tools] Re: genmodel for state machine diagram

Hi Eban,

I've not been keeping updated on what's happing in the UML2 project for a little while but I don't beleive generation of code from StateMachines has been implemented. I beleive the conversion from UML2 to Ecore is only for the class modelling parts of UML where equivalent EMF metaclasses exists. I think the only reason you are getting the "Product" come through is becuase in UML a StateMachine is a type of Class and it's getting picked up by the translater.

Implementing this type of generation isn't too hard once you are familar with both UML2 and EMF and you can achieve a lot of control. I've done it before so if you explain alittle more about what you are trying to achieve I might be able to give you some ideas.

Tas




"Eban Escott" <eban.escott@xxxxxxxxxxxxxxxx> wrote in message news:6f020c2cc5047138d4e51d4ac89073da$1@xxxxxxxxxxxxxxxxxx
When I look at the .uml file it looks like:

..
<packagedElement xmi:type="uml:StateMachine" xmi:id="_4QV5AHTSEd6tw7FQB0T26Q" name="Product">
<region xmi:id="_4QlwoHTSEd6tw7FQB0T26Q" name="Region">
<subvertex xmi:type="uml:Pseudostate" xmi:id="_-7aC0HTSEd6tw7FQB0T26Q"/>
<subvertex xmi:type="uml:FinalState" xmi:id="__kusoHTSEd6tw7FQB0T26Q"/>
<subvertex xmi:type="uml:State" xmi:id="_AdpRoHTTEd6tw7FQB0T26Q" name="ProductList"/>
<transition xmi:id="_CciAMHTTEd6tw7FQB0T26Q" source="_-7aC0HTSEd6tw7FQB0T26Q" target="_AdpRoHTTEd6tw7FQB0T26Q"/>
<transition xmi:id="_C9WOQHTTEd6tw7FQB0T26Q" source="_AdpRoHTTEd6tw7FQB0T26Q" target="__kusoHTSEd6tw7FQB0T26Q"/>
</region>
</packagedElement>
</uml:Package>


So, the statemachine has a region and some states. All good until I create an ecore model or genmodel from it but it seems to be missing everything except the packageElement. Here is the .ecore file:

<?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"; name="InputC"
nsURI="http:///InputC.ecore"; nsPrefix="InputC">
<eClassifiers xsi:type="ecore:EClass" name="Product"/>
</ecore:EPackage>


Please help! :)