How to bind IContextualOutputConfigurationProvider as ConfigurationsProvider [message #1752749] |
Thu, 26 January 2017 20:59 |
Thomas Trocha Messages: 14 Registered: October 2011 |
Junior Member |
|
|
Hi there,
I'm trying to bind IContextualOutputConfigurationProvider to get a reference to the current resource when providing my custom output configurations, but I can't get it to work. Just binding it doesn't work. At least my implementation is not called at any time.
binder.bind(IContextualOutputConfigurationProvider)
.to(CustomOutputConfigurationProvider)
.in(Singleton);
Hints would be very very very appreciated.
EDIT:
I tried to override EclipseOutputConfigurationProvider in the ui-project which would make absolute sense. But for some reason the EclipseOutputConifugrationProvider stays in charge...!?
In the UiModule:
override Class<? extends IContextualOutputConfigurationProvider> bindIContextualOutputConfigurationProvider() {
return CustomOutputConfigurationProvider;
}
Thx
[Updated on: Thu, 26 January 2017 21:24] Report message to a moderator
|
|
|
Re: How to bind IContextualOutputConfigurationProvider as ConfigurationsProvider [message #1752751 is a reply to message #1752749] |
Thu, 26 January 2017 21:15 |
|
hmmm the following works fine for me
class MyDslRuntimeModule extends AbstractMyDslRuntimeModule {
def Class<? extends IOutputConfigurationProvider> bindIOutputConfigurationProvider() {
MyDslOutputConfigurationProvider
}
def Class<? extends IContextualOutputConfigurationProvider2> bindIContextualOutputConfigurationProvider2() {
MyDslOutputConfigurationProvider
}
def Class<? extends IContextualOutputConfigurationProvider> bindIContextualOutputConfigurationProvider() {
MyDslOutputConfigurationProvider
}
}
or short
class MyDslRuntimeModule extends AbstractMyDslRuntimeModule {
def Class<? extends OutputConfigurationProvider> bindIOutputConfigurationProvider() {
MyDslOutputConfigurationProvider
}
}
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03952 seconds