Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » IStorage2UriMapperJdtExtensions unbound in Xtext 2.4
IStorage2UriMapperJdtExtensions unbound in Xtext 2.4 [message #1036448] Mon, 08 April 2013 11:57 Go to next message
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1853
Registered: July 2009
Senior Member
While migrating a tool from Xtext 2.3 to 2.4, launching fails with this exception:
com.google.inject.ConfigurationException: Guice configuration errors:

1) No implementation for org.eclipse.xtext.ui.resource.IStorage2UriMapperJdtExtensions was bound.
  while locating org.eclipse.xtext.ui.resource.IStorage2UriMapperJdtExtensions
    for field at org.eclipse.xtext.ui.resource.XtextResourceSetProvider.storage2UriMapper(Unknown Source)
  while locating org.eclipse.xtext.ui.resource.XtextResourceSetProvider

1 error
	at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:1004)
	at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:961)
	at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1013)
	...


Where should I be getting the binding for IStorage2UriMapperJdtExtensions from?

thanks,
Stephan

PS: I would be quite relaxed about this migration, but due to https://bugs.eclipse.org/403888 I'm no longer able to use Xtext 2.3.
Re: IStorage2UriMapperJdtExtensions unbound in Xtext 2.4 [message #1036472 is a reply to message #1036448] Mon, 08 April 2013 12:34 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
Hi Stephan,

it is bound in the SharedModuleWithJDT. Do you use a runtime enviornment
without JDT?

Regards,
Sebastian
--
Looking for professional support for Xtext, Xtend or Eclipse Modeling?
Go visit: http://xtext.itemis.com

Am 08.04.13 13:57, schrieb Stephan Herrmann:
> While migrating a tool from Xtext 2.3 to 2.4, launching fails with this
> exception:
> com.google.inject.ConfigurationException: Guice configuration errors:
>
> 1) No implementation for
> org.eclipse.xtext.ui.resource.IStorage2UriMapperJdtExtensions was bound.
> while locating
> org.eclipse.xtext.ui.resource.IStorage2UriMapperJdtExtensions
> for field at
> org.eclipse.xtext.ui.resource.XtextResourceSetProvider.storage2UriMapper(Unknown
> Source)
> while locating org.eclipse.xtext.ui.resource.XtextResourceSetProvider
>
> 1 error
> at
> com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:1004)
> at
> com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:961)
> at
> com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1013)
> ...
>
>
> Where should I be getting the binding for
> IStorage2UriMapperJdtExtensions from?
>
> thanks,
> Stephan
>
> PS: I would be quite relaxed about this migration, but due to
> https://bugs.eclipse.org/403888 I'm no longer able to use Xtext 2.3.
Re: IStorage2UriMapperJdtExtensions unbound in Xtext 2.4 [message #1036485 is a reply to message #1036472] Mon, 08 April 2013 12:49 Go to previous messageGo to next message
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1853
Registered: July 2009
Senior Member
Hi Sebastian,

while searching my 2.3-based implementation and how this ever found its depedencies, I don't even see how XtextResourceSetProvider is bound, ups?

The injector in question belongs to the headless language plug-in (from which the model plug-in has been separated), the injector has been created using the module that is derived from the generated module which in turn extends DefaultRuntimeModule, so indeed, I don't see any specific connection to JDT.

The code in question is part of a test plug-in, which *does* have xtext.ui in its dependencies, so could that plug-in dependency contribute the XtextResourceSetProvider to all injectors?

best,
Stephan
Re: IStorage2UriMapperJdtExtensions unbound in Xtext 2.4 [message #1036506 is a reply to message #1036485] Mon, 08 April 2013 13:18 Go to previous message
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1853
Registered: July 2009
Senior Member
OK, I seem to have a workaround:

Previously, this worked like a breeze:
myInjector = Guice.createInjector(new MyDslRuntimeModule());


With xtext 2.4 I need this instead:
CompoundModule mod = new CompoundModule();
mod.add(new MyDslRuntimeModule());
mod.add(new Module() {
	@Override
	public void configure(Binder binder) {
		binder.bind(IStorage2UriMapperJdtExtensions.class).to(Storage2UriMapperJavaImpl.class);
		binder.bind(IJdtHelper.class).to(JdtHelper.class);
	}
});
myInjector = Guice.createInjector(mod);


This also pulls in an additional dependency to xtext.ui.shared, hmpf.

As you'll certainly wonder, why I'm manually creating the injector: its a plug-in for combined unit tests involving several DSLs, so there's no "natural" way for obtaining an injector with all desired capabilities. But all that shouldn't be the point, in 2.3 it perfectly worked, and in 2.4 it works with the above workaround.

best,
Stephan
Previous Topic:Eclipse Downloads with 2.3.1
Next Topic:XbaseCompiler creating new objects for this access
Goto Forum:
  


Current Time: Fri Mar 29 13:36:23 GMT 2024

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

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

Back to the top