use of org.eclipse.n4js.generator.headless.IssueCollector in project n4js by eclipse.
the class AccessControlTest method compile.
/**
* Compiles the projects generated into the path at {@link #FIXTURE_ROOT}, which in this test case the projects
* representing the currently tested scenario and returns the generated issues.
*
* @return the generated issues
*/
private static Collection<Issue> compile(MemberType memberType) {
IssueCollector issueCollector = new IssueCollector();
try {
N4HeadlessCompiler hlc = HeadlessCompilerFactory.createCompilerWithDefaults();
final File projectRoot = Paths.get(FIXTURE_ROOT, memberType.name()).toFile();
hlc.compileAllProjects(Arrays.asList(projectRoot), issueCollector);
} catch (N4JSCompileException e) {
// nothing to do
}
return issueCollector.getCollectedIssues();
}
Aggregations