Apart from UML class diagrams, is it possible to parse OCL contraints (transitions, guards and actions) from a UML State Machine associated to a Java class with Eclipse OCL?
In principle, yes; and this could apply in practice when using the Java
API from Europa onwards.
In practice, there has been significant redevelopment to exploit the
Xtext editing capabilities. State Machines are UML, for which last
minute support has been added for Indigo by the simple expedient of a
UML2Ecore conversion. I therefore doubt that it will work when using an
interactive 'API'. I certainly haven't even exercised it.
If the UML2Ecore conversion happens to convert state machines to
classes, then it might just happen to work anyway.
I'm afraid that you may need to wait for Juno milestone releases to see
full interactive UML support.
Regards
Ed Willink
On 21/05/2011 15:31, miguelafr wrote:
> Hello,
>
> Apart from UML class diagrams, is it possible to parse OCL contraints
> (transitions, guards and actions) from a UML State Machine associated
> to a Java class with Eclipse OCL?
>
> Thank you very much in advanced
I am refering to use a Java library which allows to transform a UML state machine (.uml file) into Java objects, that can be used for different purposes.
Ok. It seems like you will want to use the OCL Java API to at least
check your OCL as you transform the UML states.
Today use of OCL at run time probably requires you put the OCL strings
into you Java code, and do a first time compile
to ASTs before you use the OCL as guards and transitions. This is what
EMF's genmodel does for OCL embedded in Ecore.
On 25/05/2011 20:46, miguelafr wrote:
> I am refering to use a Java library which allows to transform a UML
> state machine (.uml file) into Java objects, that can be used for
> different purposes.