| /******************************************************************************* |
| * Copyright (c) 2014 Willink Transformations and others. |
| * 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: |
| * E.D.Willink - initial API and implementation |
| *******************************************************************************/ |
| package org.eclipse.qvtd.xtext.qvtcorebase; |
| |
| import org.eclipse.qvtd.pivot.qvtcorebase.QVTcoreBasePivotStandaloneSetup; |
| import org.eclipse.qvtd.xtext.qvtcorebasecs.QVTcoreBaseCSPackage; |
| |
| import com.google.inject.Injector; |
| |
| /** |
| * Initialization support for running Xtext languages |
| * without equinox extension registry |
| */ |
| public class QVTcoreBaseStandaloneSetup extends QVTcoreBaseStandaloneSetupGenerated |
| { |
| private static Injector injector = null; |
| |
| public static void doSetup() { |
| if (injector == null) { |
| injector = new QVTcoreBaseStandaloneSetup().createInjectorAndDoEMFRegistration(); |
| } |
| } |
| |
| public static void init() { |
| QVTcoreBasePivotStandaloneSetup.doSetup(); |
| QVTcoreBaseCSPackage.eINSTANCE.getName(); |
| // QVTcoreBaseCS2MonikerVisitor.FACTORY.getClass(); |
| } |
| |
| /** |
| * Return the Injector for this plugin. |
| */ |
| public static final Injector getInjector() { |
| if (injector == null) { |
| doSetup(); |
| } |
| return injector; |
| } |
| |
| @Override |
| public Injector createInjector() { |
| init(); |
| return super.createInjector(); |
| } |
| } |
| |