Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » Metamodel in workspace in QVTO Problem (Metamodel in workspace in QVTO Problem)
Metamodel in workspace in QVTO Problem [message #779461] Sun, 15 January 2012 15:16 Go to next message
Gustavo Bartolomeo is currently offline Gustavo Bartolomeo
Messages: 2
Registered: January 2012
Junior Member
Hi all,
Sorry for my English, I am beginner.
I have a problem with the use of a metamodel in workspace from a QVTO' transformation.

I have defined the following mapping:
<mapping sourceURI="rdbExtended/rdb" targetURI="platform:/resource/rdbExtended/model/rdbExtended.ecore"/>

And this is a piece of my transformation:

modeltype RDB uses 'rdbExtended/rdb';
--IN THIS WAY DOES NOT WORK:
--modeltype RDB uses 'platform:/resource/rdbExtended/model/rdbExtended.ecore';

transformation rdb2rdb(inout model: RDB);

main() {
  model.rootObjects()[RDB::Model]->map model2RModel();
}
...
...


THE PROBLEM IS THAT THE DEBUGGER SAYS THE Set 'model.rootObjects()[RDB::Model]' IS EMPTY, BUT ACTUALLY MY MODEL HAS AN ELEMENT OF TYPE Model.
See the attached image.
index.php/fa/6743/0/

This works if I use:
modeltype RDB uses 'ht..://www.eclipse.org/qvt/1.0.0/Operational/examples/rdb';


Thanks, Regards.
Gustavo.
  • Attachment: qvto.jpg
    (Size: 85.91KB, Downloaded 229 times)
Re: Metamodel in workspace in QVTO Problem [message #780363 is a reply to message #779461] Tue, 17 January 2012 12:03 Go to previous messageGo to next message
Ed Willink is currently offline Ed Willink
Messages: 4025
Registered: July 2009
Senior Member
Hi Gustavo

I suspect that you have my 'favourite' problem; meta-model schizophrenia.

You are referencing the same meta-model by two different names and so
you have two distinct copies. You loaded a 'left-hand' Model but are
transforming 'right-hand' Models.

Make sure you only use one of platform: ... or http: ... of file:... to
reference it.

Regards

Ed Willink

On 15/01/2012 20:16, Gustavo Bartolomeo wrote:
> Hi all,
> Sorry for my English, I am beginner.
> I have a problem with the use of a metamodel in workspace from a QVTO' transformation.
>
> I have defined the following mapping:
> <mapping sourceURI="rdbExtended/rdb" targetURI="platform:/resource/rdbExtended/model/rdbExtended.ecore"/>
>
> And this is a piece of my transformation:
>
>
> modeltype RDB uses 'rdbExtended/rdb';
> --IN THIS WAY DOES NOT WORK:
> --modeltype RDB uses 'platform:/resource/rdbExtended/model/rdbExtended.ecore';
>
> transformation rdb2rdb(inout model: RDB);
>
> main() {
> model.rootObjects()[RDB::Model]->map model2RModel();
> }
> ..
> ..
>
>
> THE PROBLEM IS THAT THE DEBUGGER SAYS THE Set 'model.rootObjects()[RDB::Model]' IS EMPTY, BUT ACTUALLY MY MODEL HAS AN ELEMENT OF TYPE Model.
> See the attached image.
>
>
> This works if I use:
>
> modeltype RDB uses 'ht..://www.eclipse.org/qvt/1.0.0/Operational/examples/rdb';
>
>
> Thanks, Regards.
> Gustavo.
>
Re: Metamodel in workspace in QVTO Problem [message #817876 is a reply to message #780363] Sat, 10 March 2012 15:15 Go to previous messageGo to next message
Gustavo Bartolomeo is currently offline Gustavo Bartolomeo
Messages: 2
Registered: January 2012
Junior Member
Thanks Ed,
In this case the problem was the use of dynamic instances.
I built an editor for my local metamodel.
Then create an instance using the editor, and the transformation worked!
Re: Metamodel in workspace in QVTO Problem [message #818148 is a reply to message #817876] Sun, 11 March 2012 01:10 Go to previous message
Ed Willink is currently offline Ed Willink
Messages: 4025
Registered: July 2009
Senior Member
Hi Gustavo

What you describe is a workaround that works for you.

I am successfully using QVTo for a cascade of transformations without
generating a Java model, let alone a Java editor.

Regards

Ed Willink

On 10/03/2012 20:15, Gustavo Bartolomeo wrote:
> Thanks Ed,
> In this case the problem was the use of dynamic instances.
> I built an editor for my local metamodel.
> Then create an instance using the editor, and the transformation worked!
>
Re: Metamodel in workspace in QVTO Problem [message #818153 is a reply to message #817876] Sun, 11 March 2012 01:10 Go to previous message
Ed Willink is currently offline Ed Willink
Messages: 4025
Registered: July 2009
Senior Member
Hi Gustavo

What you describe is a workaround that works for you.

I am successfully using QVTo for a cascade of transformations without
generating a Java model, let alone a Java editor.

Regards

Ed Willink

On 10/03/2012 20:15, Gustavo Bartolomeo wrote:
> Thanks Ed,
> In this case the problem was the use of dynamic instances.
> I built an editor for my local metamodel.
> Then create an instance using the editor, and the transformation worked!
>
Re: Metamodel in workspace in QVTO Problem [message #818158 is a reply to message #817876] Sun, 11 March 2012 01:10 Go to previous message
Ed Willink is currently offline Ed Willink
Messages: 4025
Registered: July 2009
Senior Member
Hi Gustavo

What you describe is a workaround that works for you.

I am successfully using QVTo for a cascade of transformations without
generating a Java model, let alone a Java editor.

Regards

Ed Willink

On 10/03/2012 20:15, Gustavo Bartolomeo wrote:
> Thanks Ed,
> In this case the problem was the use of dynamic instances.
> I built an editor for my local metamodel.
> Then create an instance using the editor, and the transformation worked!
>
Re: Metamodel in workspace in QVTO Problem [message #818163 is a reply to message #817876] Sun, 11 March 2012 01:10 Go to previous message
Ed Willink is currently offline Ed Willink
Messages: 4025
Registered: July 2009
Senior Member
Hi Gustavo

What you describe is a workaround that works for you.

I am successfully using QVTo for a cascade of transformations without
generating a Java model, let alone a Java editor.

Regards

Ed Willink

On 10/03/2012 20:15, Gustavo Bartolomeo wrote:
> Thanks Ed,
> In this case the problem was the use of dynamic instances.
> I built an editor for my local metamodel.
> Then create an instance using the editor, and the transformation worked!
>
Re: Metamodel in workspace in QVTO Problem [message #818168 is a reply to message #817876] Sun, 11 March 2012 01:10 Go to previous message
Ed Willink is currently offline Ed Willink
Messages: 4025
Registered: July 2009
Senior Member
Hi Gustavo

What you describe is a workaround that works for you.

I am successfully using QVTo for a cascade of transformations without
generating a Java model, let alone a Java editor.

Regards

Ed Willink

On 10/03/2012 20:15, Gustavo Bartolomeo wrote:
> Thanks Ed,
> In this case the problem was the use of dynamic instances.
> I built an editor for my local metamodel.
> Then create an instance using the editor, and the transformation worked!
>
Re: Metamodel in workspace in QVTO Problem [message #818173 is a reply to message #817876] Sun, 11 March 2012 01:10 Go to previous message
Ed Willink is currently offline Ed Willink
Messages: 4025
Registered: July 2009
Senior Member
Hi Gustavo

What you describe is a workaround that works for you.

I am successfully using QVTo for a cascade of transformations without
generating a Java model, let alone a Java editor.

Regards

Ed Willink

On 10/03/2012 20:15, Gustavo Bartolomeo wrote:
> Thanks Ed,
> In this case the problem was the use of dynamic instances.
> I built an editor for my local metamodel.
> Then create an instance using the editor, and the transformation worked!
>
Re: Metamodel in workspace in QVTO Problem [message #818178 is a reply to message #817876] Sun, 11 March 2012 01:10 Go to previous message
Ed Willink is currently offline Ed Willink
Messages: 4025
Registered: July 2009
Senior Member
Hi Gustavo

What you describe is a workaround that works for you.

I am successfully using QVTo for a cascade of transformations without
generating a Java model, let alone a Java editor.

Regards

Ed Willink

On 10/03/2012 20:15, Gustavo Bartolomeo wrote:
> Thanks Ed,
> In this case the problem was the use of dynamic instances.
> I built an editor for my local metamodel.
> Then create an instance using the editor, and the transformation worked!
>
Re: Metamodel in workspace in QVTO Problem [message #818183 is a reply to message #817876] Sun, 11 March 2012 01:10 Go to previous message
Ed Willink is currently offline Ed Willink
Messages: 4025
Registered: July 2009
Senior Member
Hi Gustavo

What you describe is a workaround that works for you.

I am successfully using QVTo for a cascade of transformations without
generating a Java model, let alone a Java editor.

Regards

Ed Willink

On 10/03/2012 20:15, Gustavo Bartolomeo wrote:
> Thanks Ed,
> In this case the problem was the use of dynamic instances.
> I built an editor for my local metamodel.
> Then create an instance using the editor, and the transformation worked!
>
Previous Topic:[QVTo] Standalone execution
Next Topic:Simulink M2M transformation - what is a good approach?
Goto Forum:
  


Current Time: Wed Aug 20 02:53:31 EDT 2014

Powered by FUDForum. Page generated in 0.02177 seconds