Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [QVTO] Run transformation via extension point "org.eclipse.m2m.qvt.oml.runtime.qvtTransformatio
[QVTO] Run transformation via extension point "org.eclipse.m2m.qvt.oml.runtime.qvtTransformatio [message #836714] Wed, 04 April 2012 20:39 Go to next message
Christopher Gerking is currently offline Christopher GerkingFriend
Messages: 115
Registered: April 2011
Senior Member
My transformation project extends "org.eclipse.m2m.qvt.oml.runtime.qvtTransformation". Hence, if located in the development workspace, the transformation is executable in the runtime workspace.

This works up to the point where I make one of the input/output ecore meta-models reference another ecore (i.e. an EClass in my input or output ecore has an EReference to an EClass within another ecore, which is neither input nor output). If I refer to that EReference leading to the other ecore, I get the error message "Failed to parse transformation" when trying to execute the transformation in the runtime workspace. This is strange, because in the development workspace, there are no compilation errors.

Does anyone have an idea? Do I need to register the referenced ecore as part of the extension?
Re: [QVTO] Run transformation via extension point "org.eclipse.m2m.qvt.oml.runtime.qvtTrans [message #837134 is a reply to message #836714] Thu, 05 April 2012 09:57 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

"Do I need to register the referenced ecore as part of the extension? "

Sort of.

When you run within Eclipse inter-model references are comparatively
easy since you have a normalising environment that ensures that
- packages such as http://www.eclipse.org/emf/2002/Ecore are registered
automatically
- pseudo-locations such as platform:/plugin and platform:/resource
exists and are mutually ../../.. navigable

None of this happens once you leave Eclipse and run standalone

Registering packages is easy, and actually happens just by referring to
them: EPackage.eINSTANCE.getClass()
Making platform: and ../.. navigation work is hard;
https://bugs.eclipse.org/bugs/show_bug.cgi?id=361063 is a solution.

I recommend only using http: and at most intra-project ../.. navigation
to keep things simple. You can use file: to make it work for you today,
but don't expect it to work for anyone else, or even you once code has
bounced in and out of a CM tool.

Remember that your stabdalone configuration must match your Eclipse
configuration if facilities used within Eclipse are to be similarly
referenceable standalone.

Regards

Ed Willink


On 04/04/2012 21:39, Missing name Mising name wrote:
> My transformation project extends
> "org.eclipse.m2m.qvt.oml.runtime.qvtTransformation". Hence, if located
> in the development workspace, the transformation is executable in the
> runtime workspace.
>
> This works up to the point where I make one of the input/output ecore
> meta-models reference another ecore (i.e. an EClass in my input or
> output ecore has an EReference to an EClass within another ecore,
> which is neither input nor output). If I refer to that EReference
> leading to the other ecore, I get the error message "Failed to parse
> transformation" when trying to execute the transformation in the
> runtime workspace. This is strange, because in the development
> workspace, there are no compilation errors.
>
> Does anyone have an idea? Do I need to register the referenced ecore
> as part of the extension?
Re: [QVTO] Run transformation via extension point "org.eclipse.m2m.qvt.oml.runtime.qvtTrans [message #838632 is a reply to message #837134] Sat, 07 April 2012 11:04 Go to previous messageGo to next message
Christopher Gerking is currently offline Christopher GerkingFriend
Messages: 115
Registered: April 2011
Senior Member
Thanks for your support.

I think the problem occurs again due to the fact that I have nested packages within the referenced ecore file.

Within my transformation, I only import the toplevel package of my ecore. This one is empty (no classes, just sub-packages), so no EPackage is generated. Hence, the imported nsURI can't be resolved in the runtime workspace.
Re: [QVTO] Run transformation via extension point "org.eclipse.m2m.qvt.oml.runtime.qvtT [message #838643 is a reply to message #838632] Sat, 07 April 2012 11:27 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Yes. Sometimes EMF's omission of empty packages is too helpful. Try
putting in a dummy class.

Regards

Ed Willink

On 07/04/2012 12:04, Missing name Mising name wrote:
> Thanks for your support.
>
> I think the problem occurs again due to the fact that I have nested
> packages within the referenced ecore file.
>
> Within my transformation, I only import the toplevel package of my
> ecore. This one is empty (no classes, just sub-packages), so no
> EPackage is generated. Hence, the imported nsURI can't be resolved in
> the runtime workspace.
Previous Topic:[QVTO] Use metamodel mappings with nested packages
Next Topic:Nmodels2Nmodels transformation [qvto]
Goto Forum:
  


Current Time: Wed Apr 24 23:54:40 GMT 2024

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

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

Back to the top