|
|
Re: [XPand] Apply oaw to xpand project error [message #930235 is a reply to message #930173] |
Tue, 02 October 2012 06:05 |
|
The qualified value of "expand" must be read as follows: The last segment is the definition within the Xpand file ("main"), obviously correct. The segment before is the name of the template file ("mytemplate" => "mytemplate.xpt"). All segments in front of that are the path to that Xpand file relative to classpath root. And I think here is your problem. I guess that "src" is actually your source folder, and thus the classpath root itself. The template thus lies directly in the classpath root, and the value for "expand" must be "mytemplate::main FOR EPC".
Regards,
~Karsten
Need professional support for Xtext, EMF, Eclipse IDE?
Go to: http://devhub.karakun.com
Twitter : @kthoms
Blog : www.karsten-thoms.de
|
|
|
|
|
|
|
|
|
|
|
|
Re: [XPand] Apply oaw to xpand project error [message #931502 is a reply to message #931484] |
Wed, 03 October 2012 09:05 |
|
Hi I do not know atop but if they come with an own type system you
should maybe use this one instead of xsd. Maybe they do an internal
model2model transformation too. Therefore you should ask the artop
guys what they internally do and which kind of metamodel to use and
how to read the model.
I mean you should use eclipse xpand instead of law xpand.
--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext at itemis dot de
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: [XPand] Apply oaw to xpand project error [message #934074 is a reply to message #933764] |
Fri, 05 October 2012 16:23 |
|
Hi,
i just gave it a try:
the problem is. autosar.xsd has notthing todo with *.arxml
here is what works
(use javabeans metamodel in xpand and required deps to the project.
<workflow>
<bean class="org.eclipse.emf.mwe.utils.StandaloneSetup" platformUri="..">
<registerGeneratedEPackage value="autosar40.util.Autosar40Package" />
<extensionMap>
<from value="arxml" />
<to value="autosar40.util.Autosar40ResourceFactoryImpl" />
</extensionMap>
</bean>
<component class="org.eclipse.emf.mwe.utils.Reader">
<modelSlot value="model" />
<uri value="platform:/resource/test/default.arxml" />
</component>
<component class="org.eclipse.xpand2.Generator">
<expand value="test::main FOR model" />
<outlet path="src-gen" />
<metaModel class="org.eclipse.xtend.type.impl.java.JavaBeansMetaModel" />
</component>
</workflow>
«DEFINE main FOR autosar40::autosartoplevelstructure::AUTOSAR»
«FILE "test.txt"»
«this»
«ENDFILE»
«ENDDEFINE»
~Christian
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
|
|
|
|
|
|
|
|
|
Re: [XPand] Apply oaw to xpand project error [message #937674 is a reply to message #937629] |
Tue, 09 October 2012 07:00 |
Jack Vo Messages: 21 Registered: September 2012 |
Junior Member |
|
|
Hi,
I need generate header .h, and need access parameters in my model, get its value and its name, ex: In my model haves 2 part BMD and EPC, BMD contains definition of 'parameter'(name; type int, enum, string..; range; description), EPC map and set value for it. This model is result when I create by AUTOSAR project in Artop
In my opinion, model is structure of some things insist of its definition and its value and xpand or acceleo is template that can access to these things and organize them follow the way we want(header file, html file ...). Do I misunderstand any important point?
Thanks
|
|
|
|
|
|
|
|