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: 14661
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


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: Fri Mar 29 06:37:41 GMT 2024

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

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

Back to the top