Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » QVT-OML » Manual transformation vs. programmatic transformation
Manual transformation vs. programmatic transformation [message #1061622] Mon, 03 June 2013 10:50 Go to next message
Emre T is currently offline Emre TFriend
Messages: 119
Registered: April 2013
Senior Member
Hello there!

I have discovered a difference between calling a QVTo transformation manually from Eclipse "Run" menu and calling it programmatically through TransformationExecutor.

The difference is as follows:

If I call the transformation manually, the references to imported packages or referenced elements outside the main model etc. in the resulted model instance are realized with the namespaces of the regarding packages. Like this: href="http://x.y.z/SomethingModel/0.1#//Something" or href="http://www.eclipse.org/emf/2002/Ecore#/"

But if I call the transformation programmatically, then the packages imported or referenced elements are referenced through their relative paths to their Ecore's, which will eventually be not the same on different development environments. For example: href="../../../plugin/org.eclipse.emf.ecore/model/Ecore.ecore#/" or href="../../../plugin/x.y.z.t/model/SomethingModel.ecore#//Something"

Is this a problem regarding the QVTo itself? Is it expected to be like this? Or maybe I need to do some extras to achieve this?

In the end I want to use the namespaces. For example I tried to register the EPackages of the models I refer in my main model and also transformation, but it wasn't a success.

Any help will be appreciated.

Thanks!
Re: Manual transformation vs. programmatic transformation [message #1061638 is a reply to message #1061622] Mon, 03 June 2013 11:37 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Inconsistency between plugin and standalone URI resolution is a constant
problem for novices and experts alike.

Therefore the OCL Examples and Editors provides a ProjectMap class that
enables you to initialize a standalone environment to behave as a plugin
environment. Similar but less comprehensive functionality is available
via EcorePlugin.ExtensionProcessor.

Regards

Ed Willink


On 03/06/2013 11:50, Emre Taspolatoglu wrote:
> Hello there!
>
> I have discovered a difference between calling a QVTo transformation
> manually from Eclipse "Run" menu and calling it programmatically
> through TransformationExecutor.
>
> The difference is as follows:
>
> If I call the transformation manually, the references to imported
> packages or referenced elements outside the main model etc. in the
> resulted model instance are realized with the namespaces of the
> regarding packages. Like this:
> href="http://x.y.z/SomethingModel/0.1#//Something" or
> href="http://www.eclipse.org/emf/2002/Ecore#/"
>
> But if I call the transformation programmatically, then the packages
> imported or referenced elements are referenced through their relative
> paths to their Ecore's, which will eventually be not the same on
> different development environments. For example:
> href="../../../plugin/org.eclipse.emf.ecore/model/Ecore.ecore#/" or
> href="../../../plugin/x.y.z.t/model/SomethingModel.ecore#//Something"
>
> Is this a problem regarding the QVTo itself? Is it expected to be like
> this? Or maybe I need to do some extras to achieve this?
>
> In the end I want to use the namespaces. For example I tried to
> register the EPackages of the models I refer in my main model and also
> transformation, but it wasn't a success.
>
> Any help will be appreciated.
>
> Thanks!
Re: Manual transformation vs. programmatic transformation [message #1061702 is a reply to message #1061638] Mon, 03 June 2013 14:26 Go to previous messageGo to next message
Emre T is currently offline Emre TFriend
Messages: 119
Registered: April 2013
Senior Member
Hello Ed, thanks for the quick response.

I understand from your response, that there are no direct programmatic QVTo solutions for this issue, and one has to make use of this ProjectMap class from OCL. Is it right? Then I would have to take a look into this OCL Examples and Editors.

Best regards,
Emre

Re: Manual transformation vs. programmatic transformation [message #1061706 is a reply to message #1061702] Mon, 03 June 2013 14:40 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Yes. AFAIK ProjectMap is the only solution that makes the problem go away.

Too many other users/projects have fudged and in some cases made the
problems more obscure.

Regards

Ed Willink


On 03/06/2013 15:26, Emre Taspolatoglu wrote:
> Hello Ed, thanks for the quick response.
>
> I understand from your response, that there are no direct programmatic
> QVTo solutions for this issue, and one has to make use of this
> ProjectMap class from OCL. Is it right? Then I would have to take a
> look into this OCL Examples and Editors.
>
> Best regards,
> Emre
>
>
Previous Topic:Jumping over abstract model elements of source
Next Topic:[Announce] Eclipse QVT Operational 3.3.0 (Kepler) RC3 is now available
Goto Forum:
  


Current Time: Thu Apr 18 08:06:38 GMT 2024

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

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

Back to the top