Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalf Mollik2018-04-03 15:16:02 +0000
committerRalf Mollik2018-04-03 15:16:02 +0000
commit4ad106d2643767d0898366a8d15b8b1583fab5a8 (patch)
tree7836dd68e971eb7c2a7f603754b8ac0540fb85cb
parent5b1f591cef8a0294b4cc5419fb45581edac509c7 (diff)
downloadorg.eclipse.osbp.xtext.cube-4ad106d2643767d0898366a8d15b8b1583fab5a8.tar.gz
org.eclipse.osbp.xtext.cube-4ad106d2643767d0898366a8d15b8b1583fab5a8.tar.xz
org.eclipse.osbp.xtext.cube-4ad106d2643767d0898366a8d15b8b1583fab5a8.zip
rename file
-rw-r--r--org.eclipse.osbp.xtext.cubedsl.ui/src-gen/org/eclipse/osbp/xtext/cubedsl/ui/internal/CubeDSLActivator.java106
1 files changed, 0 insertions, 106 deletions
diff --git a/org.eclipse.osbp.xtext.cubedsl.ui/src-gen/org/eclipse/osbp/xtext/cubedsl/ui/internal/CubeDSLActivator.java b/org.eclipse.osbp.xtext.cubedsl.ui/src-gen/org/eclipse/osbp/xtext/cubedsl/ui/internal/CubeDSLActivator.java
deleted file mode 100644
index 146ce48..0000000
--- a/org.eclipse.osbp.xtext.cubedsl.ui/src-gen/org/eclipse/osbp/xtext/cubedsl/ui/internal/CubeDSLActivator.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/**
- *
- * Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation
- *
- * generated by Xtext 2.11.0
- *
- */
-
-package org.eclipse.osbp.xtext.cubedsl.ui.internal;
-
-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.osbp.xtext.cubedsl.CubeDSLRuntimeModule;
-import org.eclipse.osbp.xtext.cubedsl.ui.CubeDSLUiModule;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.eclipse.xtext.ui.shared.SharedStateModule;
-import org.eclipse.xtext.util.Modules2;
-import org.osgi.framework.BundleContext;
-
-/**
- * This class was generated. Customizations should only happen in a newly
- * introduced subclass.
- */
-public class CubedslActivator extends AbstractUIPlugin {
-
- public static final String ORG_ECLIPSE_OSBP_XTEXT_CUBEDSL_CUBEDSL = "org.eclipse.osbp.xtext.cubedsl.CubeDSL";
-
- private static final Logger logger = Logger.getLogger(CubedslActivator.class);
-
- private static CubedslActivator INSTANCE;
-
- private Map<String, Injector> injectors = Collections.synchronizedMap(Maps.<String, Injector> newHashMapWithExpectedSize(1));
-
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- INSTANCE = this;
- }
-
- @Override
- public void stop(BundleContext context) throws Exception {
- injectors.clear();
- INSTANCE = null;
- super.stop(context);
- }
-
- public static CubedslActivator 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 (ORG_ECLIPSE_OSBP_XTEXT_CUBEDSL_CUBEDSL.equals(grammar)) {
- return new CubeDSLRuntimeModule();
- }
- throw new IllegalArgumentException(grammar);
- }
-
- protected Module getUiModule(String grammar) {
- if (ORG_ECLIPSE_OSBP_XTEXT_CUBEDSL_CUBEDSL.equals(grammar)) {
- return new CubeDSLUiModule(this);
- }
- throw new IllegalArgumentException(grammar);
- }
-
- protected Module getSharedStateModule() {
- return new SharedStateModule();
- }
-
-}

Back to the top