Example #1
0
 private static void addToHistory(
     final SMTestProxy.SMRootTestProxy root,
     TestConsoleProperties consoleProperties,
     Disposable parentDisposable) {
   final RunProfile configuration = consoleProperties.getConfiguration();
   if (configuration instanceof RunConfiguration
       && !(consoleProperties instanceof ImportedTestConsoleProperties)) {
     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);
   }
 }
Example #2
0
  public static void addLabel(final TestFrameworkRunningModel model) {
    String label;
    int color;

    if (model.getRoot().isDefect()) {
      color = RED.getRGB();
      label = ExecutionBundle.message("junit.runing.info.tests.failed.label");
    } else {
      color = GREEN.getRGB();
      label = ExecutionBundle.message("junit.runing.info.tests.passed.label");
    }
    final TestConsoleProperties consoleProperties = model.getProperties();
    String name = label + " " + consoleProperties.getConfiguration().getName();
    LocalHistory.getInstance().putSystemLabel(consoleProperties.getProject(), name, color);
  }