Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Question concerning package for IValueConverter
Question concerning package for IValueConverter [message #1766749] Mon, 26 June 2017 18:16 Go to next message
Christoph Steinforth is currently offline Christoph SteinforthFriend
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 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
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
Re: Question concerning package for IValueConverter [message #1766752 is a reply to message #1766750] Mon, 26 June 2017 18:45 Go to previous message
Christoph Steinforth is currently offline Christoph SteinforthFriend
Messages: 11
Registered: June 2017
Junior Member
Hi Christian,

thanks for the quick answer.

Regards,

Christoph
Previous Topic:Xtext prefences pages
Next Topic:IncrementalBuild loop in XText 2.11
Goto Forum:
  


Current Time: Thu Apr 18 16:17:40 GMT 2024

Powered by FUDForum. Page generated in 0.01997 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top