Esempio n. 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);
   }
 }
Esempio n. 2
0
  public SMTestRunnerResultsForm(
      @NotNull final JComponent console,
      AnAction[] consoleActions,
      final TestConsoleProperties consoleProperties,
      @Nullable String splitterPropertyName) {
    super(
        console,
        consoleActions,
        consoleProperties,
        StringUtil.notNullize(splitterPropertyName, DEFAULT_SM_RUNNER_SPLITTER_PROPERTY),
        0.2f);
    myProject = consoleProperties.getProject();

    // Create tests common suite root
    //noinspection HardCodedStringLiteral
    myTestsRootNode = new SMTestProxy.SMRootTestProxy();
    // todo myTestsRootNode.setOutputFilePath(runConfiguration.getOutputFilePath());

    // Fire selection changed and move focus on SHIFT+ENTER
    // TODO[romeo] improve
    /*
    final ArrayList<Component> components = new ArrayList<Component>();
    components.add(myTreeView);
    components.add(myTabs.getComponent());
    myContentPane.setFocusTraversalPolicy(new MyFocusTraversalPolicy(components));
    myContentPane.setFocusCycleRoot(true);
    */
  }
Esempio n. 3
0
 public MySaveHistoryTask(
     TestConsoleProperties consoleProperties,
     SMTestProxy.SMRootTestProxy root,
     RunConfiguration configuration) {
   super(consoleProperties.getProject(), "Save Test Results", true);
   myConsoleProperties = consoleProperties;
   myRoot = root;
   myConfiguration = configuration;
 }