package edu.kit.iti.formal.pse.worthwhile;

import com.google.inject.Injector;

import edu.kit.iti.formal.pse.worthwhile.model.ast.impl.AstPackageImpl;

/**
 * Initialization support for running Xtext languages without equinox extension
 * registry.
 */
public class WorthwhileStandaloneSetup extends
WorthwhileStandaloneSetupGenerated {

	public static void doSetup() {
		new WorthwhileStandaloneSetup().createInjectorAndDoEMFRegistration();
	}

	@Override
	public Injector createInjectorAndDoEMFRegistration() {
		AstPackageImpl.init();
		return super.createInjectorAndDoEMFRegistration();
	}
}

package edu.kit.iti.formal.pse.worthwhile;

/**
 * Initialization support for running Xtext languages without equinox extension
 * registry.
 */
public class WorthwhileStandaloneSetup extends
	WorthwhileStandaloneSetupGenerated {

    public static void doSetup() {
	new WorthwhileStandaloneSetup().createInjectorAndDoEMFRegistration();
    }
}

--- 
+++ 
@@ -1,13 +1,23 @@
 package edu.kit.iti.formal.pse.worthwhile;
+
+import com.google.inject.Injector;
+
+import edu.kit.iti.formal.pse.worthwhile.model.ast.impl.AstPackageImpl;
 
 /**
  * Initialization support for running Xtext languages without equinox extension
  * registry.
  */
 public class WorthwhileStandaloneSetup extends
-	WorthwhileStandaloneSetupGenerated {
+WorthwhileStandaloneSetupGenerated {
 
-    public static void doSetup() {
-	new WorthwhileStandaloneSetup().createInjectorAndDoEMFRegistration();
-    }
+	public static void doSetup() {
+		new WorthwhileStandaloneSetup().createInjectorAndDoEMFRegistration();
+	}
+
+	@Override
+	public Injector createInjectorAndDoEMFRegistration() {
+		AstPackageImpl.init();
+		return super.createInjectorAndDoEMFRegistration();
+	}
 }
[impl] Add workaround for model resolving bug in unit tests

Stolen from http://www.eclipse.org/forums/index.php/m/735764/
