|
|
|
Re: CompilationTestHelper problem with generated non-java code [message #1051925 is a reply to message #1051919] |
Mon, 29 April 2013 11:31 |
|
On 04/29/2013 01:24 PM, Thomas Fritsch wrote:
> Jan Kohnlein wrote on Mon, 29 April 2013 10:27
>> The CompilationTestHelper belongs to Xbase and assumes Java code to be
>> generated. This is not a bug but works as designed.
>>
>> If you want to inspect the generated XML code you have to implement
>> your own helper class, e.g. by stripping the Java stuff from
>> org.eclipse.xtext.xbase.compiler.CompilationTestHelper.compile(ResourceSet,
>> IAcceptor<Result>) or using the ParseHelper and the IGenerator of your
>> language.
>
>
> Thanks for your reply.
>
> Ok, I agree. For inspecting the generated XML code I need to implement a helper class of my own. I will begin that soon.
>
> But how about inspecting/testing the generated Java code?
> For doing so it would be nice if the CompilationTestHelper just would gracefully ignore all non-Java code. May be like in attachment.
>
> ~Thomas
>
I was using CompilationTestHelper in Xtext 2.3.1 and I was able to check
also generated Xml files, besides Java files, by inspecting, manually,
all the generated files. I think the proposed modification really
makes sense :)
cheers
Lorenzo
--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
HOME: http://www.lorenzobettini.it
HOME: http://www.lorenzobettini.it
TDD Book: https://leanpub.com/tdd-buildautomation-ci
Xtext Book: https://www.packtpub.com/application-development/implementing-domain-specific-languages-xtext-and-xtend-second-edition
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04100 seconds