[Xpand] import issue [message #765725] |
Wed, 14 December 2011 15:29 |
Federico Pozzoni Messages: 16 Registered: December 2011 |
Junior Member |
|
|
i'm trying to export my ecore to a .csv file but i've a issue with the import:
when i try to import my ecore model with «IMPORT mindmap» an error appear
Quote:Description Resource Path Location Type
"stringLiteralExpCS"is invalid(generator:1:9:1:16: ) generator.xpt /org.eclipse.dsl.project/templates line: 1 (8 .. 16) Xpand Problem
what can i do to resolve this kind of problem?
this is my .xpt
Quote:«IMPORT mindmap»
«DEFINE Main FOR Map»
«FILE title + ".csv"-»
«FOREACH elements.typeSelect(Topic) AS topic-»
«topic.name»,«topic.start»,«topic.end»
«ENDFOREACH»
«ENDFILE»
«ENDDEFINE»
tis is my .mwe
Quote:<?xml version="1.0"?>
<workflow>
<property name="model"
value="platform:/resource/org.eclipse.dsl.mindmap/model/Mindmap.xmi"/>
<property name="out" value="out" />
<!-- set up EMF for standalone execution -->
<bean class="org.eclipse.emf.mwe.utils.StandaloneSetup">
<platformUri value="../" />
</bean>
<component class="org.eclipse.emf.mwe.utils.Reader">
<uri value="${model}" />
<modelSlot value="model" />
</component>
<!-- generate code -->
<component class="org.eclipse.xpand2.Generator">
<metaModel id="mm"
class="org.eclipse.xtend.typesystem.emf.EmfRegistryMetaModel"/>
<expand value="mindmap2csv::Main FOR model" />
<outlet path="${out}"/>
</component>
</workflow>
edit
i've try some change on the .mwe that now is
Quote:
<?xml version="1.0"?>
<workflow>
<property name="model" value="platform:/resource/org.eclipse.dsl.mindmap/model/mindmap.xmi" />
<property name="out" value="out" />
<!-- set up EMF for standalone execution -->
<bean class="org.eclipse.emf.mwe.utils.StandaloneSetup">
<bean class="org.eclipse.emf.mwe.utils.StandaloneSetup" >
<platformUri value=".."/>
<registerEcoreFile value="platform:/resource/org.eclipse.dsl.mindmap/model/mindmap.ecore" />
</bean>
</bean>
<bean id="mm_emf" class="org.eclipse.xtend.typesystem.emf.EmfRegistryMetaModel"/>
<component class="org.eclipse.emf.mwe.utils.Reader">
<uri value="${model}" />
<modelSlot value="model" />
</component>
<!-- generate code -->
<component class="org.eclipse.xpand2.Generator">
<metaModel idRef="mm_emf"/>
<expand
value="template::Template::main FOR model" />
<outlet path="${src-gen}" >
<postprocessor class="org.eclipse.xpand2.output.JavaBeautifier" />
</outlet>
</component>
</workflow>
[Updated on: Wed, 14 December 2011 16:55] Report message to a moderator
|
|
|
|
|
|
|
|
|
Re: [Xpand] import issue [message #766731 is a reply to message #766668] |
Fri, 16 December 2011 10:33 |
|
The NS URI just needs to be unique. Question is if the URIs *in* the ecore XMI are valid. Usually they are, so don't be confused so much from my post. It is just that I saw Ecore files with references where the reference URIs were not valid, which leads to such an error in the editor.
Need professional support for Xtext, EMF, Eclipse IDE?
Go to: http://devhub.karakun.com
Twitter : @kthoms
Blog : www.karsten-thoms.de
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04078 seconds