Using a customized XbaseValidator [message #1768739] |
Sun, 23 July 2017 08:55 |
Marco Ullrich Messages: 14 Registered: December 2016 Location: Bayreuth |
Junior Member |
|
|
Hello everyone,
I want to customize Xbase, so that assignments to parameters are possible.
I already customized the JvmModelGenerator to generate the appropriate code and it works.
But I also need to customize the validation of Xbase.
I did subclass the XbaseValidator and customized the checkAssignment method.
My problem is: How do i inject my customized XbaseValidator instead of the original one?
I already subclassed and customized th XbaseRuntimeModule:
class BpoXbaseRuntimeModule extends XbaseRuntimeModule {
@SingletonBinding(eager=true)
override Class<? extends XbaseValidator> bindXbaseValidator() {
return BpoXbaseValidator;
}
}
and the XbaseStandaloneSetup:
class BpoXbaseStandaloneSetup extends XbaseStandaloneSetup{
override Injector createInjector() {
return Guice.createInjector(new BpoXbaseRuntimeModule());
}
def static void doSetup() {
new BpoXbaseStandaloneSetup().createInjectorAndDoEMFRegistration()
}
}
But my validator is not injected during runtime.
Do I have to customize another part?
How does the runtime know wich StandaloneSetup to use?
Thanks in advance and best regards,
Marco
[Updated on: Sun, 23 July 2017 08:56] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03628 seconds