Closed alexandrebouchard closed 7 years ago
Work-around pushed in commit 3a7accf of blangSDK. Remains to do the auto-import of the extension methods in blang.utils.ExtensionUtils
Instead of auto-import, maybe use local extension? I.e. methods from a base class
That does not work in the base class because all the stuff is static.
Solution:
http://koehnlein.blogspot.co.uk/2011/07/extending-xbase.html https://github.com/svenefftinge/Xtext-2.0-released-source-code/blob/master/plugins/org.eclipse.xtext.xbase/src/org/eclipse/xtext/xbase/scoping/featurecalls/StaticMethodsFeatureForTypeProvider.java
Actually, above deprecated, see instead: ImplicitlyImportedFeatures
Ok prototype of this is working! Now just need to push through all the cases and clean up.
Ok, fixed with f95a8b666bc3efbc521f6766cf5c3dbb22199206
Let x denote an object of type say IntVar. Then a statement of the form
x == 1
will never be true since auto deboxing never triggers here.A workaround would be to use extension method to overload ==, but we would need to find a way to auto import it to make sure it's always there.