Search in sources :

Example 6 with RunConfiguration

use of org.eclipse.n4js.runner.RunConfiguration in project n4js by eclipse.

the class RunExternalLibrariesPluginTest method runClient.

private ProcessResult runClient() {
    final String pathToModuleToRun = getResourceName(CLIENT, CLIENT_MODULE);
    final org.eclipse.emf.common.util.URI moduleToRun = createPlatformResourceURI(pathToModuleToRun, true);
    final RunConfiguration config = runnerFrontEnd.createConfiguration(ID, null, moduleToRun);
    final Process process = runnerFrontEndUI.runInUI(config);
    final ProcessResult result = processExecutor.execute(process, "", OutputRedirection.REDIRECT);
    if (result.isOK())
        return result;
    throw new RuntimeException("Client exited with error.\n" + result);
}
Also used : RunConfiguration(org.eclipse.n4js.runner.RunConfiguration) ProcessResult(org.eclipse.n4js.utils.process.ProcessResult)

Aggregations

RunConfiguration (org.eclipse.n4js.runner.RunConfiguration)6 File (java.io.File)2 ProcessResult (org.eclipse.n4js.utils.process.ProcessResult)2 HashSet (java.util.HashSet)1 ILaunchConfigurationType (org.eclipse.debug.core.ILaunchConfigurationType)1 ILaunchManager (org.eclipse.debug.core.ILaunchManager)1 URI (org.eclipse.emf.common.util.URI)1 Resource (org.eclipse.emf.ecore.resource.Resource)1 ExitCodeException (org.eclipse.n4js.hlc.base.ExitCodeException)1 Script (org.eclipse.n4js.n4JS.Script)1 IRunnerDescriptor (org.eclipse.n4js.runner.extension.IRunnerDescriptor)1 AbstractBuilderParticipantTest (org.eclipse.n4js.tests.builder.AbstractBuilderParticipantTest)1 XtextResource (org.eclipse.xtext.resource.XtextResource)1 Test (org.junit.Test)1