/*
* generated by Xtext
*/
package at.bestsolution.efxclipse.tooling.svgpath;
import org.eclipse.xtext.junit4.GlobalRegistries;
import org.eclipse.xtext.junit4.GlobalRegistries.GlobalStateMemento;
import org.eclipse.xtext.junit4.IInjectorProvider;
import org.eclipse.xtext.junit4.IRegistryConfigurator;
import com.google.inject.Injector;
public class SvgPathInjectorProvider implements IInjectorProvider, IRegistryConfigurator {
protected GlobalStateMemento globalStateMemento;
protected Injector injector;
static {
GlobalRegistries.initializeDefaults();
}
public Injector getInjector() {
if (injector == null) {
this.injector = new SvgPathStandaloneSetup().createInjectorAndDoEMFRegistration();
}
return injector;
}
public void restoreRegistry() {
globalStateMemento.restoreGlobalState();
}
public void setupRegistry() {
globalStateMemento = GlobalRegistries.makeCopyOfGlobalState();
if (injector != null)
new SvgPathStandaloneSetup().register(injector);
}
}