|
|
Re: Help! Not understanding state machine diagram to implementation [message #538375 is a reply to message #538349] |
Mon, 07 June 2010 13:30 |
|
Hi, Anthony,
The MDT UML2 project's code generation is only roughly equivalent to the
class diagramming subset of UML. It will generate the structure of
classes, but there is no support for generating behaviour except
inasmuch as in can be specified as OCL or Java-snippet annotations.
If you are using MDT UML2 only, then you will get a Java class (and an
Ecore EClass) generated for your state machine only because a UML state
machine is a kind of class. But the code that is generated will be as
meaningless as the class structure of any state machine.
If you are using some tool that purports to generate behaviour from
state machines, then this is not the right newsgroup.
HTH,
Christian
On 07/06/10 08:47 AM, Anthony William wrote:
> Hello,
>
> I've been playing with the UML2 and UML2Tools components for a few days
> now. I can create diagrams with states, triggers, and activities. Then
> I'm able to use EMF to generate my model code.
>
> But I'm really struggling on understanding how to use the model java
> classes.
>
> I look at my state machine class and the switch class and all I really
> see of importance is a doSwitch method. So basically I'm not
> understanding how this code works to move through states and interact
> with events, triggers, and activities.
> I know that the generated class aren't going to do everything for me and
> that I will have to write additional code, it's just that I don't see
> the hooks as to where I would add this code.
>
> Any help or links to previous topics on this (I did do some searching
> already) would be great.
>
> Anthony
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02689 seconds