Question concerning package for IValueConverter [message #1766749] |
Mon, 26 June 2017 18:16 |
Christoph Steinforth Messages: 11 Registered: June 2017 |
Junior Member |
|
|
Hi there,
maybe this has been asked before, but I was not able to find a concise answer. Which one of the automatically generated packages would be the best/correct position for an Implementation of IValueConverter or an extension to AbstractDeclarativeValueConverterService? Are there any addtitonal steps apart from registering this to the runtime module in order to export this to a generated plugin?
Thanks in advance,
Christoph
[Updated on: Mon, 26 June 2017 18:17] Report message to a moderator
|
|
|
Re: Question concerning package for IValueConverter [message #1766750 is a reply to message #1766749] |
Mon, 26 June 2017 18:20 |
|
Hi,
you can put it whereever you want in the runtime module. you can even create a brand new package for it.
you ususally register value converters using a @Singleton subclass of org.eclipse.xtext.common.services.DefaultTerminalConverters
and bind it like
@Override
public Class<? extends IValueConverterService> bindIValueConverterService() {
return MyValueConverters.class;
}
respectively
override Class<? extends IValueConverterService> bindIValueConverterService() {
MyValueConverters;
}
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
|
|
|
|
Powered by
FUDForum. Page generated in 0.03601 seconds