Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » Eclipse OCL and UML State Machines(UML State Machines)
Eclipse OCL and UML State Machines [message #672518] Sat, 21 May 2011 14:31 Go to next message
miguelafr  is currently offline miguelafr Friend
Messages: 9
Registered: April 2011
Junior Member
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
Re: Eclipse OCL and UML State Machines [message #672520 is a reply to message #672518] Sat, 21 May 2011 14:58 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 4188
Registered: July 2009
Senior Member
Hi

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
Re: Eclipse OCL and UML State Machines [message #673820 is a reply to message #672520] Tue, 24 May 2011 20:40 Go to previous messageGo to next message
miguelafr  is currently offline miguelafr Friend
Messages: 9
Registered: April 2011
Junior Member
Thank you Edward,

With the current Eclipse release, should I use the UML2 component (http://www.eclipse.org/modeling/mdt/downloads/?project=uml2) or the OCL component (http://www.eclipse.org/modeling/mdt/downloads/?project=ocl) to parse a UML state chart?
Re: Eclipse OCL and UML State Machines [message #673824 is a reply to message #673820] Tue, 24 May 2011 20:46 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 4188
Registered: July 2009
Senior Member
Hi

I'm not clear what you mean by parse a UML state chart.

The UML model will be a model so no parsing is required.

The embedded OCL may be unparsed text, for which you will need to use
the OCL parser.

Regards

Ed Willink

On 24/05/2011 21:40, miguelafr wrote:
> Thank you Edward,
>
> With the current Eclipse release, should I use the UML2 component
> (http://www.eclipse.org/modeling/mdt/downloads/?project=uml2) or the
> OCL component
> (http://www.eclipse.org/modeling/mdt/downloads/?project=ocl) to parse
> a UML state chart?
Re: Eclipse OCL and UML State Machines [message #674090 is a reply to message #673824] Wed, 25 May 2011 19:46 Go to previous messageGo to next message
miguelafr  is currently offline miguelafr Friend
Messages: 9
Registered: April 2011
Junior Member
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.
Re: Eclipse OCL and UML State Machines [message #674109 is a reply to message #674090] Wed, 25 May 2011 20:43 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 4188
Registered: July 2009
Senior Member
Hi

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.

After Indigo we plan to do direct Java generation so you should be able
to invoke Java subroutines that do the states and transitions.
This has been added to https://bugs.eclipse.org/bugs/show_bug.cgi?id=279638.

Regards

Ed Willink

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.
Previous Topic:Documentation tooling
Next Topic:Inaccurate results in operations on Real types
Goto Forum:
  


Current Time: Sun Dec 21 10:00:14 GMT 2014

Powered by FUDForum. Page generated in 0.09676 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software