Community
Participate
Working Groups
From the xtend/xpand file the type of my feature is StringTypeImpl and from the Ecore it's a JavaTypeImpl where the clazz attribute is a java.lang.String. In my Ecore the type of the feature is not an EString, but an Identifier with the instanceclassname is a java.lang.String. That's why features are not found when compiling an xtend file. I have modified JavaTypeImpl#internalIsAssignableFrom(final Type t) to the code below: @Override protected boolean internalIsAssignableFrom(final Type t) { if (t instanceof JavaTypeImpl){ return clazz.isAssignableFrom(((JavaTypeImpl) t).clazz); }else if (t instanceof StringTypeImpl){ return clazz.isAssignableFrom(String.class); }else if(t instanceof BooleanTypeImpl){ return clazz.isAssignableFrom(Boolean.class); }else if(t instanceof IntegerTypeImpl){ return clazz.isAssignableFrom(Integer.class); }else if(t instanceof RealTypeImpl){ return clazz.isAssignableFrom(Double.class) || clazz.isAssignableFrom(Float.class); } return false; } This code resolve my problem but I don't know if it's a good idea to do this at this level.
could you please provide a small sample project to reproduce the issue?
Created attachment 204008 [details] patch for bug 357392 this patches the bug 357392
OK for the patch !
Applied and reviewed the patch. Thanks for submitting.
Bug resolved before Xpand 1.2 release date => Closing