Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » Re: Regarding XPand template file(contd..)
Re: Regarding XPand template file(contd..) [message #63330] Tue, 30 June 2009 06:59 Go to next message
Ed Merks is currently offline Ed Merks
Messages: 25744
Registered: July 2009
Senior Member
Dugra,

All the template languages are serviced by the M2T newsgroup, which I've
added to the "to" list of the reply.


Durga Prasana Sahoo wrote:
> And the generator.mwe file is:
>
> <workflow>
> <bean class="org.eclipse.emf.mwe.utils.StandaloneSetup"
> platformUri=".."/>
>
> <component class="org.eclipse.emf.mwe.utils.DirectoryCleaner"
> directory="src-gen"/>
>
> <component class="org.eclipse.xtext.MweReader"
> uri="classpath:/model/MyModel.Ed_proxy">
> <!-- this class will be generated by the xtext generator -->
> <register class="org.xtext.samm.Edifice_proxyStandaloneSetup"/>
> </component>
>
> <component class="org.eclipse.xpand2.Generator">
> <metaModel
> class="org.eclipse.xtend.typesystem.emf.EmfRegistryMetaModel "/>
> <expand value="templates::PrimitiveComp_template::def_1 FOR
> samm::staticstructure::PrimitiveComponent"/>
> <genPath value="src-gen"/>
> </component>
>
> </workflow>
> ------------------------------------------------------------ --------------
>
>
> the generator shows the following error:
> 0 [main] INFO eclipse.emf.mwe.core.WorkflowRunner -
> ------------------------------------------------------------ --------------------------
>
> 60 [main] INFO eclipse.emf.mwe.core.WorkflowRunner - EMF Modeling
> Workflow Engine 0.7.0, Build v200906091110
> 60 [main] INFO eclipse.emf.mwe.core.WorkflowRunner - (c) 2005-2009
> openarchitectureware.org and contributors
> 60 [main] INFO eclipse.emf.mwe.core.WorkflowRunner -
> ------------------------------------------------------------ --------------------------
>
> 60 [main] INFO eclipse.emf.mwe.core.WorkflowRunner - running
> workflow:
> C:/Users/Durga/workspace_TMF/org.xtext.samm.Edifice_proxy.ge nerator/src/workflow/Edifice_proxyGenerator.mwe
>
> 61 [main] INFO eclipse.emf.mwe.core.WorkflowRunner - 935 [main]
> INFO lipse.emf.mwe.utils.StandaloneSetup - Registering platform uri
> 'C:\Users\Durga\workspace_TMF'
> 2536 [main] INFO e.core.container.CompositeComponent -
> DirectoryCleaner: cleaning directory 'src-gen'
> 2537 [main] INFO ipse.emf.mwe.utils.DirectoryCleaner - Cleaning
> C:\Users\Durga\workspace_TMF\org.xtext.samm.Edifice_proxy.ge nerator\src-gen
>
> 2538 [main] INFO e.core.container.CompositeComponent - MweReader:
> loading file from classpath:/model/MyModel.Ed_proxy
> 3634 [main] INFO e.core.container.CompositeComponent - Generator:
> generating 'templates::PrimitiveComp_template::def_1 FOR
> samm::staticstructure::PrimitiveComponent' => []
> 3709 [main] ERROR org.eclipse.xpand2.Generator - Error in
> Component of type org.eclipse.xpand2.Generator:
> EvaluationException : Couldn't find enum literal or type
> 'samm::staticstructure::PrimitiveComponent'
> [75,41] on line 1 'samm::staticstructure::PrimitiveComponent'
>
> 3709 [main] ERROR eclipse.emf.mwe.core.WorkflowRunner - Workflow
> interrupted. Reason: Couldn't find enum literal or type
> 'samm::staticstructure::PrimitiveComponent'
> 3710 [main] ERROR eclipse.emf.mwe.core.WorkflowRunner - [ERROR]:
> Couldn't find enum literal or type
> 'samm::staticstructure::PrimitiveComponent'(Element:
> samm::staticstructure::PrimitiveComponent; Reported by: Generator:
> generating 'templates::PrimitiveComp_template::def_1 FOR
> samm::staticstructure::PrimitiveComponent' => [])
> 3710 [main] ERROR eclipse.emf.mwe.core.WorkflowRunner - [ERROR]:
> Couldn't find enum literal or type
> 'samm::staticstructure::PrimitiveComponent'(Element: EXPAND
> templates::PrimitiveComp_template::def_1 FOR
> samm::staticstructure::PrimitiveComponent; Reported by: Generator:
> generating 'templates::PrimitiveComp_template::def_1 FOR
> samm::staticstructure::PrimitiveComponent' => [])
> ------------------------------------------------------------ ------------
>
> Can anybody pls tell where I'm goin wrong?
>
> I'm confused why it can't find any reference to the metamodel EClass!!
>
> Thanks
>
> Durga
>
Re: Regarding XPand template file(contd..) [message #645615 is a reply to message #63330] Sat, 18 December 2010 15:41 Go to previous message
Hendy Irawan is currently offline Hendy Irawan
Messages: 58
Registered: July 2009
Location: Bandung, Indonesia
Member

1. Check your model file (.xmi). See: http://spring-java-ee.blogspot.com/2010/12/fixing-eclipse-mw e-error-workflow.html

2. Check your plugin.xml file, make sure it contains extension on "org.eclipse.emf.ecore.generated_package" . Sample:

   <extension point="org.eclipse.emf.ecore.generated_package">
      <package
            uri="http://www.bippo.co.id/shop/3.0/magentoconfig/1.0"
            class="id.co.bippo.magento.config.MagentoConfigPackage"/>
   </extension>


3. Check that you've (re-)generated your model classes. Open your .genmodel and regenerate the Model.

More info on : http://spring-java-ee.blogspot.com/ (EMF-related posts)
Previous Topic:[Xpand & Xtend] OCL to Java
Next Topic:Setting up mwe workflow file contents?
Goto Forum:
  


Current Time: Fri Apr 18 14:17:54 EDT 2014

Powered by FUDForum. Page generated in 0.08136 seconds