// Path: RocLang/robotcontrol.parent/robotcontrol/xtend-gen/robotcontrol/RocRuntimeModule.java
// @SuppressWarnings("all")
// public class RocRuntimeModule extends AbstractRocRuntimeModule {
// }
// 
// Path: RocLang/robotcontrol.parent/robotcontrol.ui/xtend-gen/robotcontrol/ui/RocUiModule.java
// @FinalFieldsConstructor
// @SuppressWarnings("all")
// public class RocUiModule extends AbstractRocUiModule {
//   public RocUiModule(final AbstractUIPlugin plugin) {
//     super(plugin);
//   }
// }


import com.google.common.collect.Maps;
import com.google.inject.Guice;
import com.google.inject.Injector;
import com.google.inject.Module;
import java.util.Collections;
import java.util.Map;
import org.apache.log4j.Logger;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.eclipse.xtext.ui.shared.SharedStateModule;
import org.eclipse.xtext.util.Modules2;
import org.osgi.framework.BundleContext;
import robotcontrol.RocRuntimeModule;
import robotcontrol.ui.RocUiModule;
	public static RobotcontrolActivator getInstance() {
		return INSTANCE;
	}
	
	public Injector getInjector(String language) {
		synchronized (injectors) {
			Injector injector = injectors.get(language);
			if (injector == null) {
				injectors.put(language, injector = createInjector(language));
			}
			return injector;
		}
	}
	
	protected Injector createInjector(String language) {
		try {
			Module runtimeModule = getRuntimeModule(language);
			Module sharedStateModule = getSharedStateModule();
			Module uiModule = getUiModule(language);
			Module mergedModule = Modules2.mixin(runtimeModule, sharedStateModule, uiModule);
			return Guice.createInjector(mergedModule);
		} catch (Exception e) {
			logger.error("Failed to create injector for " + language);
			logger.error(e.getMessage(), e);
			throw new RuntimeException("Failed to create injector for " + language, e);
		}
	}
	
	protected Module getRuntimeModule(String grammar) {
		if (ROBOTCONTROL_ROC.equals(grammar)) {
// Path: RocLang/robotcontrol.parent/robotcontrol/xtend-gen/robotcontrol/RocRuntimeModule.java
// @SuppressWarnings("all")
// public class RocRuntimeModule extends AbstractRocRuntimeModule {
// }
// 
// Path: RocLang/robotcontrol.parent/robotcontrol.ui/xtend-gen/robotcontrol/ui/RocUiModule.java
// @FinalFieldsConstructor
// @SuppressWarnings("all")
// public class RocUiModule extends AbstractRocUiModule {
//   public RocUiModule(final AbstractUIPlugin plugin) {
//     super(plugin);
//   }
// }


// Path: RocLang/robotcontrol.parent/robotcontrol.ui/src-gen/robotcontrol/ui/internal/RobotcontrolActivator.java
import com.google.common.collect.Maps;
import com.google.inject.Guice;
import com.google.inject.Injector;
import com.google.inject.Module;
import java.util.Collections;
import java.util.Map;
import org.apache.log4j.Logger;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.eclipse.xtext.ui.shared.SharedStateModule;
import org.eclipse.xtext.util.Modules2;
import org.osgi.framework.BundleContext;
import robotcontrol.RocRuntimeModule;
import robotcontrol.ui.RocUiModule;

	public static RobotcontrolActivator getInstance() {
		return INSTANCE;
	}
	
	public Injector getInjector(String language) {
		synchronized (injectors) {
			Injector injector = injectors.get(language);
			if (injector == null) {
				injectors.put(language, injector = createInjector(language));
			}
			return injector;
		}
	}
	
	protected Injector createInjector(String language) {
		try {
			Module runtimeModule = getRuntimeModule(language);
			Module sharedStateModule = getSharedStateModule();
			Module uiModule = getUiModule(language);
			Module mergedModule = Modules2.mixin(runtimeModule, sharedStateModule, uiModule);
			return Guice.createInjector(mergedModule);
		} catch (Exception e) {
			logger.error("Failed to create injector for " + language);
			logger.error(e.getMessage(), e);
			throw new RuntimeException("Failed to create injector for " + language, e);
		}
	}
	
	protected Module getRuntimeModule(String grammar) {
		if (ROBOTCONTROL_ROC.equals(grammar)) {
			return new RocRuntimeModule();