// Path: antlr4ide.tests/src/main/java/com/github/jknack/antlr4ide/Antlr4TestInjectorProvider.java
// public class Antlr4TestInjectorProvider extends Antlr4InjectorProvider {
// 	
// 	@Override
// 	protected Injector internalCreateInjector() {
// 		Antlr4TestStandaloneSetup antlr4TestStandaloneSetup = new Antlr4TestStandaloneSetup();
// 		return antlr4TestStandaloneSetup.createInjectorAndDoEMFRegistration();
// 	}
// 
// }
// 
// Path: antlr4ide.tests/src/main/java/com/github/jknack/antlr4ide/parser/Antlr4ParseHelper.java
// @Singleton
// public class Antlr4ParseHelper<T extends EObject> {
// 	
// 	@Inject
// 	private IParser parser;
// 	
// 	public IParseResult parse(final CharSequence input) {
// 		final String content = input.toString();
// 		final StringReader stringReader = new StringReader(content);
// 		return this.parser.parse(stringReader);
// 	}
// 	
// 	@SuppressWarnings({ "hiding", "unchecked" })
// 	public <T extends Object> T build(final CharSequence input) {
// 		final String content = input.toString();
// 		final StringReader stringReader = new StringReader(content);
// 		final IParseResult parseResult = this.parser.parse(stringReader);
// 		final EObject rootAstElement = parseResult.getRootASTElement();
// 		return ((T) rootAstElement);
// 	}
// 	
// 	public String getTextFromFile(final Class<?> clazz)
// 			throws Exception {
// 		return getTextFromFile(clazz, "");
// 	}
// 	
// 	public String getTextFromFile(final Class<?> clazz, final String suffix)
// 			throws Exception {
// 		return getTextFromFile(clazz, suffix, ".g4");
// 	}
// 		
// 	public String getTextFromFile(final Class<?> clazz, final String suffix,
// 			final String fileExtension) throws Exception {
// 		final String dir = "src/main/resources/";
// 		final String dir2 = dir.replace("/", File.separator);
// 		//final Package pkg = clazz.getPackage();
// 		//final String pkgName = pkg.getName();
// 		//final String pkgName2 = pkgName.replace(".", File.separator);
// 		//final String pathAsString = (((dir2 + pkgName2) + File.separator) + fileName);
// 		final String fileName = clazz.getSimpleName() + suffix + fileExtension;
// 		final String pathAsString = dir2 + fileName;
// 		final File file = new File(pathAsString);
// 		final String content = FileUtils.readFileToString(file, "UTF-8");
// 		return content;
// 	}
// 	
// }


import com.github.jknack.antlr4ide.Antlr4TestInjectorProvider;
import com.github.jknack.antlr4ide.lang.Grammar;
import com.github.jknack.antlr4ide.parser.Antlr4ParseHelper;
import com.google.inject.Inject;
import org.eclipse.xtext.junit4.InjectWith;
import org.eclipse.xtext.junit4.XtextRunner;
import org.eclipse.xtext.parser.IParseResult;
import org.eclipse.xtext.xbase.lib.Exceptions;
import org.eclipse.xtext.xbase.lib.Extension;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
package com.github.jknack.antlr4ide.issues;


@RunWith(XtextRunner.class)
@InjectWith(Antlr4TestInjectorProvider.class)
public class Issue42 {
	
	@Inject
	@Extension
// Path: antlr4ide.tests/src/main/java/com/github/jknack/antlr4ide/Antlr4TestInjectorProvider.java
// public class Antlr4TestInjectorProvider extends Antlr4InjectorProvider {
// 	
// 	@Override
// 	protected Injector internalCreateInjector() {
// 		Antlr4TestStandaloneSetup antlr4TestStandaloneSetup = new Antlr4TestStandaloneSetup();
// 		return antlr4TestStandaloneSetup.createInjectorAndDoEMFRegistration();
// 	}
// 
// }
// 
// Path: antlr4ide.tests/src/main/java/com/github/jknack/antlr4ide/parser/Antlr4ParseHelper.java
// @Singleton
// public class Antlr4ParseHelper<T extends EObject> {
// 	
// 	@Inject
// 	private IParser parser;
// 	
// 	public IParseResult parse(final CharSequence input) {
// 		final String content = input.toString();
// 		final StringReader stringReader = new StringReader(content);
// 		return this.parser.parse(stringReader);
// 	}
// 	
// 	@SuppressWarnings({ "hiding", "unchecked" })
// 	public <T extends Object> T build(final CharSequence input) {
// 		final String content = input.toString();
// 		final StringReader stringReader = new StringReader(content);
// 		final IParseResult parseResult = this.parser.parse(stringReader);
// 		final EObject rootAstElement = parseResult.getRootASTElement();
// 		return ((T) rootAstElement);
// 	}
// 	
// 	public String getTextFromFile(final Class<?> clazz)
// 			throws Exception {
// 		return getTextFromFile(clazz, "");
// 	}
// 	
// 	public String getTextFromFile(final Class<?> clazz, final String suffix)
// 			throws Exception {
// 		return getTextFromFile(clazz, suffix, ".g4");
// 	}
// 		
// 	public String getTextFromFile(final Class<?> clazz, final String suffix,
// 			final String fileExtension) throws Exception {
// 		final String dir = "src/main/resources/";
// 		final String dir2 = dir.replace("/", File.separator);
// 		//final Package pkg = clazz.getPackage();
// 		//final String pkgName = pkg.getName();
// 		//final String pkgName2 = pkgName.replace(".", File.separator);
// 		//final String pathAsString = (((dir2 + pkgName2) + File.separator) + fileName);
// 		final String fileName = clazz.getSimpleName() + suffix + fileExtension;
// 		final String pathAsString = dir2 + fileName;
// 		final File file = new File(pathAsString);
// 		final String content = FileUtils.readFileToString(file, "UTF-8");
// 		return content;
// 	}
// 	
// }


// Path: antlr4ide.tests/src/main/java/com/github/jknack/antlr4ide/issues/Issue42.java
import com.github.jknack.antlr4ide.Antlr4TestInjectorProvider;
import com.github.jknack.antlr4ide.lang.Grammar;
import com.github.jknack.antlr4ide.parser.Antlr4ParseHelper;
import com.google.inject.Inject;
import org.eclipse.xtext.junit4.InjectWith;
import org.eclipse.xtext.junit4.XtextRunner;
import org.eclipse.xtext.parser.IParseResult;
import org.eclipse.xtext.xbase.lib.Exceptions;
import org.eclipse.xtext.xbase.lib.Extension;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;

package com.github.jknack.antlr4ide.issues;


@RunWith(XtextRunner.class)
@InjectWith(Antlr4TestInjectorProvider.class)
public class Issue42 {
	
	@Inject
	@Extension
	private Antlr4ParseHelper<Grammar> parser;