diff --git a/org.eclipse.xtext.testing/src/org/eclipse/xtext/testing/smoketest/internal/WrappingInjectorProvider.java b/org.eclipse.xtext.testing/src/org/eclipse/xtext/testing/smoketest/internal/WrappingInjectorProvider.java index af79cca0f4..b6fddb2bff 100644 --- a/org.eclipse.xtext.testing/src/org/eclipse/xtext/testing/smoketest/internal/WrappingInjectorProvider.java +++ b/org.eclipse.xtext.testing/src/org/eclipse/xtext/testing/smoketest/internal/WrappingInjectorProvider.java @@ -45,8 +45,14 @@ public WrappingInjectorProvider(IInjectorProvider delegate) { this.delegate = delegate; stateBeforeInjectorCreation = GlobalRegistries.makeCopyOfGlobalState(); this.injector = createInjector(); + if (delegate instanceof IRegistryConfigurator) { + ((IRegistryConfigurator) delegate).setupRegistry(); + } registerFactory(injector); stateAfterInjectorCreation = GlobalRegistries.makeCopyOfGlobalState(); + if (delegate instanceof IRegistryConfigurator) { + ((IRegistryConfigurator) delegate).restoreRegistry(); + } } private void registerFactory(Injector injector) {