Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » The generated @Inject constructor in the label provider
The generated @Inject constructor in the label provider [message #726736] Mon, 19 September 2011 11:44 Go to next message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1812
Registered: July 2009
Location: Firenze, Italy
Senior Member
Hi

I was having a look at the label provider generated class (e.g., in the
statemachine example) and I see this injected constructor

@Inject
public StatemachineLabelProvider(AdapterFactoryLabelProvider delegate) {
super(delegate);
}

I was wondering how this injected constructor can be used, since the EMF
class AdapterFactoryLabelProvider does not have a default constructor
itself.

thanks in advance
Lorenzo


--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134 (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net


Re: The generated @Inject constructor in the label provider [message #726740 is a reply to message #726736] Mon, 19 September 2011 11:59 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi,
i guess this is the trick:

DefaultUiModule
	public Class<? extends AdapterFactoryLabelProvider> bindAdapterFactoryLabelProvider() {
		return InjectableAdapterFactoryLabelProvider.class;
	}


~Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Testing content assist
Next Topic:Publishing my DSL as a plugin?
Goto Forum:
  


Current Time: Thu Apr 18 09:10:56 GMT 2024

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

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

Back to the top