Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Can't bind IStorage2UriMapper(bind custom IStorage2UriMapper in MyDslUiModule)
Can't bind IStorage2UriMapper [message #902988] Tue, 21 August 2012 14:27 Go to next message
Sandra Shklyaeva is currently offline Sandra ShklyaevaFriend
Messages: 16
Registered: July 2012
Junior Member
I can't bind custom IStorage2UriMapper in MyDslUiModule.

I am trying to do the following in MyDslUiModule:
	public Class<? extends IStorage2UriMapper> bindIStorage2UriMapper() {
		return Storage2UriMapperMyDslImpl.class;
	}


or this:
	public void configureIStorage2UriMapper(Binder binder) {
		binder.bind(IStorage2UriMapper.class)
				.annotatedWith(Names.named("Storage2UriMapperMyDslImpl"))
				.to(Storage2UriMapperMyDslImpl.class);
	}


and also the following:
	public Provider<IStorage2UriMapper> provideIStorage2UriMapper() {
		return Access
				.<IStorage2UriMapper> provider(Storage2UriMapperMyDslImpl.class);
	}


Unfortunately, the above doesn't work. Moreover, when I checked what interface is binded, I receive Storage2UriMapperJavaImpl.

How can I bind my Storage2UriMapperMyDslImpl?
Re: Can't bind IStorage2UriMapper [message #903050 is a reply to message #902988] Tue, 21 August 2012 18:21 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13666
Registered: July 2009
Senior Member
Hi,

the IStorage2UriMapper is global and thus used in the shared ui module.
=> you have to use the extension point org.eclipse.xtext.ui.shared.overridingGuiceModule

~Christian


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Can't bind IStorage2UriMapper [message #903118 is a reply to message #903050] Wed, 22 August 2012 06:26 Go to previous message
Sandra Shklyaeva is currently offline Sandra ShklyaevaFriend
Messages: 16
Registered: July 2012
Junior Member
Thank you very much Christian. Work like a charm!
Previous Topic:Type inference across inferred jvm elements
Next Topic:Couldn't find method ''_featureCall'' for objects JvmVoid
Goto Forum:
  


Current Time: Tue Dec 01 19:07:37 GMT 2020

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

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

Back to the top