Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » QVTd and EGL
QVTd and EGL [message #558070] Fri, 10 September 2010 06:21 Go to next message
MohamedA  is currently offline MohamedA Friend
Messages: 12
Registered: August 2010
Junior Member
Hi

Is it possible for an EGL configuration to access OCL constructs from the abstract syntax tree of the OCL QVTd editor?

I have an EGL template which use an OCL file (populated with some OCL expressions) as the model and the essential OCL schema as the metamodel. A simple template like this does not return anything

[% for (d in LetExp.allOfType){ %]
[%=d%]
[%}%]

Cheers
Mo
Re: QVTd and EGL [message #558082 is a reply to message #558070] Fri, 10 September 2010 06:45 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6457
Registered: July 2009
Senior Member
Hi Mo

I have no familiarity with EGL so most of what you ask seems strange.

However, once the QVTd editor has given you a *.oclecore file, you
shouldbe able to verify its utility by opening it in the Sample Ecore
Editor and then just treat it as a model file in any other tool.

Regards

Ed Willink

On 10/09/2010 07:21, MohamedA wrote:
> Hi
>
> Is it possible for an EGL configuration to access OCL constructs from
> the abstract syntax tree of the OCL QVTd editor?
>
> I have an EGL template which use an OCL file (populated with some OCL
> expressions) as the model and the essential OCL schema as the metamodel.
> A simple template like this does not return anything
>
> [% for (d in LetExp.allOfType){ %]
> [%=d%]
> [%}%]
>
> Cheers
> Mo
Re: QVTd and EGL [message #558248 is a reply to message #558082] Fri, 10 September 2010 16:20 Go to previous messageGo to next message
MohamedA  is currently offline MohamedA Friend
Messages: 12
Registered: August 2010
Junior Member
Hi Ed,

Thanks for the reply, I just want to clarify something ...

where does the .oclecore file come from? is it generated from an ecore file annotated with OCL constraints?

I have some .ocl files in my workspace and I have to right click on them and choose open with -> OCL editor to use the QVTd editor

Cheers
Mo
Re: QVTd and EGL [message #558576 is a reply to message #558248] Mon, 13 September 2010 14:30 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6457
Registered: July 2009
Senior Member
Hi Mo

The M2M/QVTd builder, normally activated automatically when you save
with the org.eclipse.qvt.declarative.editor.ocl.ui.OCLNature present
creates a *.oclecore file as directed by the bin settings of your Java
project class path.

In moving the Royal and Loyal example to MDT/OCL, I tidied up a little
too much so there is no easy OCL example for the M2M/QVTd editor and
builder. To get one.

Check out M2M/QVTd according to the project PSF, then also checkout

org.eclipse.qvt.declarative.examples.ocl.empty
org.eclipse.qvt.declarative.examples.ocl.royalandloyal

then switch the following to e.g. the v201006250603 version

org.eclipse.qvt.declarative.examples
org.eclipse.qvt.declarative.examples.ocl.empty
org.eclipse.qvt.declarative.examples.ocl.royalandloyal

You can then run org.eclipse.qvt.declarative.examples/buildZips.xml
to create the extra OCL examples (refresh
org.eclipse.qvt.declarative.examples to see them).

You can thun run up Eclipse and find a New->Preject QVTd for
RoyalAndLoyal which will have correct configuration so that it drops a
qvtrbin/RoyalAnLoyal.oclecore.

I'll try to re-instate this example for the Helios SR1 of M2M/QVTd in a
couple of days.

Regards

Ed Willink

On 10/09/2010 17:20, MohamedA wrote:
> Hi Ed,
>
> Thanks for the reply, I just want to clarify something ...
>
> where does the .oclecore file come from? is it generated from an ecore
> file annotated with OCL constraints?
>
> I have some .ocl files in my workspace and I have to right click on them
> and choose open with -> OCL editor to use the QVTd editor
>
> Cheers
> Mo
Previous Topic:Error loading platform:/resource/CDL2BPEL/CDL.ecore: null
Next Topic:Typecast problem
Goto Forum:
  


Current Time: Wed Sep 18 14:14:30 GMT 2019

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

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

Back to the top