| /******************************************************************************* |
| * Copyright (c) 2014, 2019 Willink Transformations and others. |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v2.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v20.html |
| * |
| * Contributors: |
| * E.D.Willink - initial API and implementation |
| *******************************************************************************/ |
| package org.eclipse.qvtd.xtext.qvtimperative; |
| |
| import org.eclipse.qvtd.pivot.qvtimperative.QVTimperativePivotStandaloneSetup; |
| import org.eclipse.qvtd.xtext.qvtimperative.attributes.QVTimperativeScoping; |
| import org.eclipse.qvtd.xtext.qvtimperativecs.QVTimperativeCSPackage; |
| |
| import com.google.inject.Injector; |
| |
| /** |
| * Initialization support for running Xtext languages |
| * without equinox extension registry |
| */ |
| public class QVTimperativeStandaloneSetup extends QVTimperativeStandaloneSetupGenerated |
| { |
| private static Injector injector = null; |
| |
| public static void doSetup() { |
| if (injector == null) { |
| injector = new QVTimperativeStandaloneSetup().createInjectorAndDoEMFRegistration(); |
| } |
| } |
| |
| public static void init() { |
| QVTimperativePivotStandaloneSetup.doSetup(); |
| QVTimperativeCSPackage.eINSTANCE.getName(); |
| QVTimperativeScoping.init(); |
| // QVTimperativeCS2MonikerVisitor.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(); |
| } |
| } |
| |