Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [QVTO] reset metamodelregistry
[QVTO] reset metamodelregistry [message #513627] Wed, 10 February 2010 17:39 Go to next message
Christian Saad is currently offline Christian SaadFriend
Messages: 39
Registered: July 2009
Member
Hi,

I'm currently having problems when I try to parse queries for a meta model which has been reloaded, i.e. it's the same meta model but with different java object instances. I've traced this problem to the MetaModelRegistry which seems to cache the packages on the first load and does not have the ability to update these references. I tried using a custom metamodelregistryprovider but I was not able to overwrite the singleton metamodelregistry. Is there a way to do this?

Thanks,
Chris
Re: [QVTO] reset metamodelregistry [message #513885 is a reply to message #513627] Thu, 11 February 2010 15:29 Go to previous messageGo to next message
Christian Saad is currently offline Christian SaadFriend
Messages: 39
Registered: July 2009
Member
Figured it out: It works when I create the default MM registry using the public constructor with a EmfStandaloneMetamodelProvider. But now I'm having kind of a similar problem in OCLEnvironmentWithQVTAccessFactory where I can't overwrite the ReusableCallCtx which caches HelperOperationCalls. They need to be created each time since I'm updating references in the Helpers and therefore the fContextType in the operation call is outdated.

Regards,
Chris
Re: [QVTO] reset metamodelregistry [message #513906 is a reply to message #513627] Thu, 11 February 2010 11:12 Go to previous messageGo to next message
Sergey Boyko is currently offline Sergey BoykoFriend
Messages: 171
Registered: July 2009
Senior Member
Hi Saad,

I didn't quite understand what do you mean by "reloading" metamodels.

Workspace .ecore models are intended for the "live" metamodel changing.
Changes made to workspace .ecore become immediately visible to QVTo source.

Java impls generated for the .ecore model become available in Eclipse
instance only after being deployed to the platform (requires restarting
of that Eclipse instance).


Regards,
Sergey

C. Saad wrote:
> Hi,
>
> I'm currently having problems when I try to parse queries for a meta
> model which has been reloaded, i.e. it's the same meta model but with
> different java object instances. I've traced this problem to the
> MetaModelRegistry which seems to cache the packages on the first load
> and does not have the ability to update these references. I tried using
> a custom metamodelregistryprovider but I was not able to overwrite the
> singleton metamodelregistry. Is there a way to do this?
>
> Thanks,
> Chris
Re: [QVTO] reset metamodelregistry [message #513941 is a reply to message #513627] Thu, 11 February 2010 18:03 Go to previous message
Christian Saad is currently offline Christian SaadFriend
Messages: 39
Registered: July 2009
Member
Hi Sergey,

in my case, the models come from different repositories (i.e. ResourceSets) instead of an ecore. Actually, I'm using QVT to run Imperative OCL queries on my model ( http://dev.eclipse.org/newslists/news.eclipse.modeling.m2m/m sg04719.html). The queries are created and parsed for a given meta model but they are executed on a different instance of the meta model. Therefore I'm using a crossreferencer to locate references to the meta model against which the queries were parsed and replace them with references to the meta model on which they shall be executed (confusing, but it makes sense in my use case Wink ). Currently, the last remaining issue are the HelperOperationCalls, since they store the reference to the original meta model in a private field, so I guess I have to copy&modify the OCLEnvironmentWithQVTAccessFactory.

Regards,
Chris
Previous Topic:[QVTO] access to transformation properties
Next Topic:[ATL] XSD based model as ATL input
Goto Forum:
  


Current Time: Fri Apr 26 22:26:40 GMT 2024

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

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

Back to the top