blob: 1163fc8be170cfedbb7b5591dba51b768dea50c1 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2011, 2020 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.qvtcore;
import org.eclipse.qvtd.pivot.qvtcore.QVTcorePivotStandaloneSetup;
import org.eclipse.qvtd.xtext.qvtcorecs.QVTcoreCSPackage;
import com.google.inject.Injector;
/**
* Initialization support for running Xtext languages
* without equinox extension registry
*/
public class QVTcoreStandaloneSetup extends QVTcoreStandaloneSetupGenerated
{
private static Injector injector = null;
public static void doSetup() {
if (injector == null) {
injector = new QVTcoreStandaloneSetup().createInjectorAndDoEMFRegistration();
}
}
public static void init() {
QVTcorePivotStandaloneSetup.doSetup();
QVTcoreCSPackage.eINSTANCE.getName();
// QVTcoreCS2MonikerVisitor.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();
}
}