Community
Participate
Working Groups
If there is a class or interface named "Int" in the package that is in the implicit import list, Xtext incorrectly interprets it as the match wherever in my model I have a JvmTypeReference property with value "int". This happens even though the import normalizer has "false" as the value of the "ignoreCase" parameter. Code to reproduce is available on Github: - core project: https://github.com/cubranic/org.example.domainmodel - unit tests: https://github.com/cubranic/org.example.domainmodel.tests With the interface "Int" present in org.example.domainmodel.lib (as in the current HEAD), several tests fail that have a loop "for (var int i = 0; ...)" because the generated code becomes "for (Int i = Integer.valueOf(0); ...)". This interface was introduced in the final commit of org.example.domainmodel repo, just rewind to "master^" to see all tests in org.example.domainmodel.tests pass.
from abstracttypescope javadoc A scope that provides access to {@link JvmType types}. Case insensitivity is not supported. It's always the most outer scope.
OK, so what is "the most outer scope" in this case? The ImplicitImportsScopeProvider#getImplicitImports is called with"ignoreCase=false", so all import normalizers it creates have the same too. And more to the point, how do I ensure imports are case-sensitive? There is zero reason for them not to be in my language.
As I said. It is a xbase problem independent from the import. So nothing you can do