Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » refining mode programmatically
refining mode programmatically [message #641153] Wed, 24 November 2010 12:48 Go to next message
Eclipse UserFriend
Originally posted by: javi.criado.gmail.com

Hello,

I'm trying to launch a refining mode ATL transformation
programmatically, but I get the next error message:

org.eclipse.m2m.atl.engine.vm.VMException: Cannot find model RefiningTrace
at A.main() : ??#24(t1ref.atl)
local variables = {self=t1ref : ASMModule}
local stack = []


I've tried to load this RefiningTrace model but I don't know how.

Regards,
Javier
Re: refining mode programmatically [message #641170 is a reply to message #641153] Wed, 24 November 2010 13:26 Go to previous messageGo to next message
Sylvain EVEILLARD is currently offline Sylvain EVEILLARDFriend
Messages: 556
Registered: July 2009
Senior Member
ModelFactory factory = CoreService.createModelFactory("EMF");
refiningTraceMetamodel = factory.getBuiltInResource("RefiningTrace.ecore");
IModel refiningTraceModel = factory.newModel(refiningTraceMetamodel);
launcher.addOutModel(refiningTraceModel, "refiningTrace", "RefiningTrace");
Re: refining mode programmatically [message #641404 is a reply to message #641170] Thu, 25 November 2010 10:57 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: javi.criado.gmail.com

I've tried this, but I get a NullPointerException error at the first
line: ModelFactory factory = CoreService.createModelFactory("EMF");

so I can't create the factory element, neither the injector or the
extractor.
Re: refining mode programmatically [message #641432 is a reply to message #641153] Thu, 25 November 2010 13:08 Go to previous messageGo to next message
Sylvain EVEILLARD is currently offline Sylvain EVEILLARDFriend
Messages: 556
Registered: July 2009
Senior Member
You could try a .getModelFactory("EMF") instead of create.
I think it changes related to the ATL version.

This may also be a dependency problem. Try to add all the atl plug-ins as dependencies.
Re: refining mode programmatically [message #642287 is a reply to message #641432] Tue, 30 November 2010 16:27 Go to previous message
Eclipse UserFriend
Originally posted by: javi.criado.gmail.com

Thank you very much for your response. There was a library version
problem. The concrete library is: org.eclipse.emf.ecore
I was trying with version 2.5.0 and I've changed to 2.6.1 to get a
correct transformation.

Thank you again.
Javier Criado
Previous Topic:[QVTo] Running a QVT transformation from a program
Next Topic:[ATL] Question about Rule Inheritance
Goto Forum:
  


Current Time: Thu Mar 28 20:55:16 GMT 2024

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

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

Back to the top