Search in sources :

Example 1 with ImportedTestConsoleProperties

use of com.intellij.execution.testframework.sm.runner.history.ImportedTestConsoleProperties in project intellij-community by JetBrains.

the class SMTestRunnerResultsForm method addToHistory.

private void addToHistory(final SMTestProxy.SMRootTestProxy root, TestConsoleProperties consoleProperties, Disposable parentDisposable) {
    final RunProfile configuration = consoleProperties.getConfiguration();
    if (configuration instanceof RunConfiguration && !(consoleProperties instanceof ImportedTestConsoleProperties) && !ApplicationManager.getApplication().isUnitTestMode() && !myDisposed) {
        final MySaveHistoryTask backgroundable = new MySaveHistoryTask(consoleProperties, root, (RunConfiguration) configuration);
        final BackgroundableProcessIndicator processIndicator = new BackgroundableProcessIndicator(backgroundable);
        Disposer.register(parentDisposable, new Disposable() {

            @Override
            public void dispose() {
                processIndicator.cancel();
                backgroundable.dispose();
            }
        });
        Disposer.register(parentDisposable, processIndicator);
        ProgressManager.getInstance().runProcessWithProgressAsynchronously(backgroundable, processIndicator);
    }
}
Also used : Disposable(com.intellij.openapi.Disposable) ImportedTestConsoleProperties(com.intellij.execution.testframework.sm.runner.history.ImportedTestConsoleProperties) RunConfiguration(com.intellij.execution.configurations.RunConfiguration) BackgroundableProcessIndicator(com.intellij.openapi.progress.impl.BackgroundableProcessIndicator) RunProfile(com.intellij.execution.configurations.RunProfile)

Aggregations

RunConfiguration (com.intellij.execution.configurations.RunConfiguration)1 RunProfile (com.intellij.execution.configurations.RunProfile)1 ImportedTestConsoleProperties (com.intellij.execution.testframework.sm.runner.history.ImportedTestConsoleProperties)1 Disposable (com.intellij.openapi.Disposable)1 BackgroundableProcessIndicator (com.intellij.openapi.progress.impl.BackgroundableProcessIndicator)1