|
Re: [Acceleo] eContainer returns invalid class [message #664970 is a reply to message #664905] |
Tue, 12 April 2011 16:02   |
Ed Merks Messages: 33007 Registered: July 2009 |
Senior Member |
|
|
Melanie,
It sounds like in one case it finds the model (because its nsURI is
registered in the plugin.xml) but in the other case it doesn't, because
you have to register it manually. I.e., calling
XyxPackage.eINSTANCE.eClass() for every package you'll be using. It's
usually easier to run as a headless Eclipse application so that all the
normal registrations are just there...
Melanie Bats wrote:
> Hello,
>
> I am writing a template with Acceleo 3.1.0M5 for generating a C file
> from an ecore model and I meet a weird behaviour. In my template, I
> just call the eContainer on my object like this :
> [iConnectedData.eContainer()/]
>
> If I run my template from eclipse as plugin I obtain :
> RteLGenModel.impl.RteLGenReceiverPortImpl (shortName:
> ev_Mode_Change_Realized_rp, longName: null, category: )
> (portInterface: ev_Mode_Change_Realized_interface) which is the
> expected result
>
> but
> If I run my template from a standalone java application, the result is :
> org.eclipse.emf.ecore.impl.DynamicEObjectImpl (eClass:
> org.eclipse.emf.ecore.impl.EClassImpl (name: OclInvalid_Class)
> (instanceClassName: null) (abstract: false, interface: false))
>
> Do you have an explanation? and a solution in order that the
> eContainer works in standalone mode?
>
> Thanks,
> Melanie
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02050 seconds