use of com.intellij.execution.runners.ExecutionEnvironment in project intellij-community by JetBrains.
the class ExternalSystemBeforeRunTaskProvider method executeTask.
@Override
public boolean executeTask(DataContext context, RunConfiguration configuration, ExecutionEnvironment env, ExternalSystemBeforeRunTask beforeRunTask) {
final ExternalSystemTaskExecutionSettings executionSettings = beforeRunTask.getTaskExecutionSettings();
final List<ExternalTaskPojo> tasks = ContainerUtilRt.newArrayList();
for (String taskName : executionSettings.getTaskNames()) {
tasks.add(new ExternalTaskPojo(taskName, executionSettings.getExternalProjectPath(), null));
}
if (tasks.isEmpty())
return true;
ExecutionEnvironment environment = ExternalSystemUtil.createExecutionEnvironment(myProject, mySystemId, executionSettings, DefaultRunExecutor.EXECUTOR_ID);
if (environment == null)
return false;
final ProgramRunner runner = environment.getRunner();
environment.setExecutionId(env.getExecutionId());
return RunConfigurationBeforeRunProvider.doRunTask(DefaultRunExecutor.getRunExecutorInstance().getId(), environment, runner);
}
use of com.intellij.execution.runners.ExecutionEnvironment in project intellij-community by JetBrains.
the class GeneralToSMTRunnerEventsConvertorTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
TestConsoleProperties consoleProperties = createConsoleProperties();
TestConsoleProperties.HIDE_PASSED_TESTS.set(consoleProperties, false);
TestConsoleProperties.OPEN_FAILURE_LINE.set(consoleProperties, false);
TestConsoleProperties.SCROLL_TO_SOURCE.set(consoleProperties, false);
TestConsoleProperties.SELECT_FIRST_DEFECT.set(consoleProperties, false);
TestConsoleProperties.TRACK_RUNNING_TEST.set(consoleProperties, false);
final ExecutionEnvironment environment = new ExecutionEnvironment();
myMockResettablePrinter = new MockPrinter(true);
myConsole = new MyConsoleView(consoleProperties, environment);
myConsole.initUI();
myResultsViewer = myConsole.getResultsViewer();
myEventsProcessor = new GeneralToSMTRunnerEventsConvertor(consoleProperties.getProject(), myResultsViewer.getTestsRootNode(), "SMTestFramework");
myEventsProcessor.addEventsListener(myResultsViewer);
myTreeModel = myResultsViewer.getTreeView().getModel();
myEventsProcessor.onStartTesting();
}
use of com.intellij.execution.runners.ExecutionEnvironment in project intellij-community by JetBrains.
the class SMTestRunnerResultsFormTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
myConsoleProperties = createConsoleProperties();
TestConsoleProperties.HIDE_PASSED_TESTS.set(myConsoleProperties, false);
TestConsoleProperties.OPEN_FAILURE_LINE.set(myConsoleProperties, false);
TestConsoleProperties.SCROLL_TO_SOURCE.set(myConsoleProperties, false);
TestConsoleProperties.SELECT_FIRST_DEFECT.set(myConsoleProperties, false);
TestConsoleProperties.TRACK_RUNNING_TEST.set(myConsoleProperties, false);
final ExecutionEnvironment environment = new ExecutionEnvironment();
myConsole = new SMTRunnerConsoleView(myConsoleProperties);
myConsole.initUI();
myResultsViewer = myConsole.getResultsViewer();
myTestsRootNode = myResultsViewer.getTestsRootNode();
myEventsProcessor = new GeneralToSMTRunnerEventsConvertor(myConsoleProperties.getProject(), myResultsViewer.getTestsRootNode(), "SMTestFramework");
myEventsProcessor.addEventsListener(myResultsViewer);
myTreeModel = myResultsViewer.getTreeView().getModel();
}
use of com.intellij.execution.runners.ExecutionEnvironment in project intellij-community by JetBrains.
the class SMTRunnerConsoleTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
final TestConsoleProperties consoleProperties = createConsoleProperties();
final ExecutionEnvironment environment = new ExecutionEnvironment();
myMockResettablePrinter = new MockPrinter(true);
myConsole = new MyConsoleView(consoleProperties, environment);
myConsole.initUI();
myResultsViewer = myConsole.getResultsViewer();
myRootSuite = myResultsViewer.getTestsRootNode();
myEventsProcessor = new GeneralToSMTRunnerEventsConvertor(consoleProperties.getProject(), myResultsViewer.getTestsRootNode(), "SMTestFramework");
myEventsProcessor.onStartTesting();
}
use of com.intellij.execution.runners.ExecutionEnvironment in project intellij-community by JetBrains.
the class ToggleAutoTestAction method setSelected.
@Override
public void setSelected(AnActionEvent e, boolean state) {
Project project = e.getData(CommonDataKeys.PROJECT);
RunContentDescriptor descriptor = e.getData(LangDataKeys.RUN_CONTENT_DESCRIPTOR);
ExecutionEnvironment environment = e.getData(LangDataKeys.EXECUTION_ENVIRONMENT);
if (project != null && descriptor != null && environment != null) {
getAutoTestManager(project).setAutoTestEnabled(descriptor, environment, state);
}
}
Aggregations