Unwanted comments in generated Java Code [message #1262302] |
Mon, 03 March 2014 13:32 |
Peter Own Messages: 2 Registered: March 2014 |
Junior Member |
|
|
Hi,
I'm using a custom AbtractModelInferrer to generate Java code for my DSL. In a lot of places, I use the newTypeRef method from JvmTypesBuilder to create parameter types, fields types of return types of the classes/methods that I want to generate.
My problem is that half the time, the generated code for the type reference is commented and replaced by a generic Object type. Surprisingly, it only happens when the type reference is a generic type (List<X> or AnyClass<Y>).
As an example, half the time it generates...
public List<ChannelPort> getPort() {
... and the other half:
public /* List<ChannelPort> */Object getPort() {
What surprises me is that if I manually uncomment everything, the generated code compiles. I don't get why Xtext decides to comment this, since everything would work without these comments.
Thanks for your help,
Peter
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03650 seconds