[Xtext 2.1] What about scoping and typesystem? [message #753688] |
Fri, 28 October 2011 07:12  |
Eclipse User |
|
|
|
Hi,
first: 2.1 seems to be a very big improvment. I was sucessfull in adopting most of my Xtend generator code (~ 50.000 loc) and it is now at least 50 times faster in compiling to Java. I also like the new sytax coloring in Xtend.
My project heavily depends on Xbase and reused a lot of the internal stuff.
It seems that almost everything has been changed in scoping and typesystem. My own ScopeProvider is not bound anymore by my AbstractRuntimeModule. So I added that binding manually. But more worse is that my typesystem is not bound anymore and I could not figure out why. There is something with LazyTypeArgumentContext and a TypeArgumentContextProvider.Request which gives me no chance to bind it. So where can I bind my TypeProvider?
Will there be an example available in the future which includes scoping and typing?
Any chance to get a realeasy date for 2.1?
Thanks for the GREAT work,
Ingo
|
|
|
|
|
|
|
|
Re: [Xtext 2.1] What about scoping and typesystem? [message #753900 is a reply to message #753835] |
Sun, 30 October 2011 08:33   |
Eclipse User |
|
|
|
Hi Ingo,
it's most likely the binding to the ITypeArgumentContextHelper which is
causing the confusion. It think the easiest way is to fix this is to
bind the XbaseTypeProvider class to your subtype in your runtime module.
Both the ITypeProvider and ITypeArgumentContextHelper are bound the the
XbaseTypeProvider by default. If your redefine the XbaseTypeProvider to
YourTypeProvider, both interfaces will use the same concrete
implementation class.
Hope that helps,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
On 29.10.11 10:36, Ingo Meyer wrote:
> Yes and in some cases it will call my method, but in others not.
> When debugging I see it is not my TypeProvider being called:
> "org.eclipse.xtext.xbase.typing.XbaseTypeProvider(org.eclipse.xtext.xbase.typing.AbstractTypeProvider)._type(org.eclipse.xtext.xbase.XExpression,
> org.eclipse.xtext.common.types.JvmTypeReference, boolean) line: 283"
> So my assumption was that there is a new binding or something other new
> in 2.1 which needs a new guice binding. When I go down the stack I see
> it will get the TypeProvider from this line:
> "org.eclipse.xtext.xbase.linking.FeatureCallChecker._case(org.eclipse.xtext.common.types.JvmOperation,
> org.eclipse.xtext.xbase.XBinaryOperation,
> org.eclipse.emf.ecore.EReference,
> org.eclipse.xtext.xbase.scoping.featurecalls.JvmFeatureDescription)
> line: 286
> "
> and I could not find any guice element in "getGenericTypeContext()". The
> TypeProvider comes from the class "JvmFeatureDescription" and I don't
> now where this is coming from.
> So is it a new 2.1 thing? Any ideas on the binding?
>
> Thanks,
> Ingo
>
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.06659 seconds