problem with multiple template files [message #512057] |
Wed, 03 February 2010 13:31  |
Eclipse User |
|
|
|
Hello,
I'm a new Xpand user and I try to describe Xpand tasks in several files.
Here is what I put in my workflow file :
<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.pck">
<!-- this class will be generated by the xtext generator -->
<register class="fr.ifsic.m1info.PckDslStandaloneSetup"/>
</component>
<component class="org.eclipse.xpand2.Generator">
<metaModel class="org.eclipse.xtend.typesystem.emf.EmfRegistryMetaModel"/>
<fileEncoding value="UTF-8"/>
<expand value="templates::MemoryContext::memorycontext FOR model"/>
<expand value="templates::Format::formats FOR model"/>
<expand value="templates::Instruction::instructions FOR model"/>
<expand value="templates::Pipeline::pipeline FOR model"/>
<expand value="templates::Simulator::simulator FOR model"/>
<expand value="templates::Assembler::assembler FOR model"/>
<genPath value="src-gen"/>
</component>
</workflow>
so I have 6 files named Format.xpt, Instruction.xpt, Pipeline.xpt, Simulator.xpt and Assembler.xpt but it seems that, even if every file is read, only the last one generates something (does each task erase the results of the previous one ?).
Well, if someone can help me; it's more readable using several files than using one big template with a lot of definition. Is their simply a way to use in a particular file a definition described in another one, or something like that ? It would help...
Thanks !
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05472 seconds