Community
Participate
Working Groups
Given the dmodel package foo { entity Foo{ x:java.lang.Integer } entity Integer {} } the field x in the generated Java class will be of type "foo.Integer". Inspecting from the UI the linking seems to be correct in the model. The same scenario works in Xtend, so there must be something we haven't lifted up to Xbase yet.
No, I was wrong, unfortunately the same holds for Xtend.
That's because our code generator does / can not enumerate all classes from the same package to feed the import manager. We could query the index for classes like my.pack.NameFromJavaLang before we strip java.lang from the class reference, e.g ask for foo.Integer before we use Integer instead of java.lang.Integer. Do we have tests for cases here an inner type Integer is inherited?
We need the same functionality in organize imports. For the tests: I think we don't have them yet.
https://github.com/eclipse/xtext-xtend/issues/439