Search in sources :

Example 1 with XtendOutputConfigurationProvider

use of org.eclipse.xtend.core.compiler.XtendOutputConfigurationProvider in project xtext-xtend by eclipse.

the class XtendProjectConfigurator method configure.

@Override
public void configure(ProjectConfigurationRequest request, IProgressMonitor monitor) throws CoreException {
    addNature(request.getProject(), XtextProjectHelper.NATURE_ID, monitor);
    OutputConfiguration config = new XtendOutputConfigurationProvider().getOutputConfigurations().iterator().next();
    for (MojoExecution execution : getMojoExecutions(request, monitor)) {
        String goal = execution.getGoal();
        if (goal.equals("compile")) {
            readCompileConfig(config, request, execution);
        } else if (goal.equals("testCompile")) {
            readTestCompileConfig(config, request, execution);
        } else if (goal.equals("xtend-install-debug-info")) {
            readDebugInfoConfig(config, request, execution);
        } else if (goal.equals("xtend-test-install-debug-info")) {
            readTestDebugInfoConfig(config, request, execution);
        }
    }
    writePreferences(config, request.getProject());
}
Also used : MojoExecution(org.apache.maven.plugin.MojoExecution) OutputConfiguration(org.eclipse.xtext.generator.OutputConfiguration) XtendOutputConfigurationProvider(org.eclipse.xtend.core.compiler.XtendOutputConfigurationProvider)

Aggregations

MojoExecution (org.apache.maven.plugin.MojoExecution)1 XtendOutputConfigurationProvider (org.eclipse.xtend.core.compiler.XtendOutputConfigurationProvider)1 OutputConfiguration (org.eclipse.xtext.generator.OutputConfiguration)1