|
Re: Configuring Scope Provider Error Handler [message #759810 is a reply to message #759778] |
Wed, 30 November 2011 02:43   |
Eclipse User |
|
|
|
Mirko,
did you try to bind the error handler as a class instead of the type?
bind(ErrorHandler.class).anoatedWith(...).to(..);
Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
Am 30.11.11 01:45, schrieb Mirko Raner:
> Hi all,
>
> we're trying to debug some tricky scope provider issues and we just
> noticed that a number of exceptions get silently swallowed because
> AbstractDeclarativeScopeProvider by default uses a NullErrorHandler. So,
> we're trying to bind to the following injection point in ADSP:
>
> @Inject(optional=true)
> @Named(NAMED_ERROR_HANDLER)
> private PolymorphicDispatcher.ErrorHandler<IScope> errorHandler = new
> PolymorphicDispatcher.NullErrorHandler<IScope>();
> Our configure method looks like this, but it's not working (it does get
> executed, though):
>
> binder.bind(
> ((TypeLiteral<PolymorphicDispatcher.ErrorHandler<IScope>>)TypeLiteral.get(Types.newParameterizedType(PolymorphicDispatcher.ErrorHandler.class,
> IScope.class)))).
> annotatedWith(Names.named(AbstractDeclarativeScopeProvider.NAMED_ERROR_HANDLER)).
>
> toInstance(new PolymorphicDispatcher.DefaultErrorHandler<IScope>());
> When we break in the debugger in our custom scope provider it still
> shows a NullErrorHandler as the error handler, so apparently the binding
> didn't take. We configure the binding in the runtime module that goes
> with our scope provider, but maybe that's too late?
> Any idea what we're doing wrong here?
> Thanks!
>
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.16119 seconds