当前位置: 首页>>代码示例>>Java>>正文


Java SMTestRunnerConnectionUtil.createAndAttachConsole方法代码示例

本文整理汇总了Java中com.intellij.execution.testframework.sm.SMTestRunnerConnectionUtil.createAndAttachConsole方法的典型用法代码示例。如果您正苦于以下问题:Java SMTestRunnerConnectionUtil.createAndAttachConsole方法的具体用法?Java SMTestRunnerConnectionUtil.createAndAttachConsole怎么用?Java SMTestRunnerConnectionUtil.createAndAttachConsole使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.execution.testframework.sm.SMTestRunnerConnectionUtil的用法示例。


在下文中一共展示了SMTestRunnerConnectionUtil.createAndAttachConsole方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: execute

import com.intellij.execution.testframework.sm.SMTestRunnerConnectionUtil; //导入方法依赖的package包/类
@NotNull
@Override
public ExecutionResult execute(@NotNull Executor executor, @NotNull ProgramRunner runner) throws ExecutionException {
    if (GaugeVersion.isGreaterOrEqual(GaugeRunConfiguration.TEST_RUNNER_SUPPORT_VERSION, false)
            && GaugeSettingsService.getSettings().useIntelliJTestRunner()) {
        ProcessHandler handler = startProcess();
        GaugeConsoleProperties properties = new GaugeConsoleProperties(config, "Gauge", executor, handler);
        ConsoleView console = SMTestRunnerConnectionUtil.createAndAttachConsole("Gauge", handler, properties);
        DefaultExecutionResult result = new DefaultExecutionResult(console, handler, createActions(console, handler));
        if (ActionManager.getInstance().getAction("RerunFailedTests") != null) {
            AbstractRerunFailedTestsAction action = properties.createRerunFailedTestsAction(console);
            if (action != null) {
                action.setModelProvider(((SMTRunnerConsoleView) console)::getResultsViewer);
                result.setRestartActions(action);
            }
        }
        return result;
    }
    return super.execute(executor, runner);
}
 
开发者ID:getgauge,项目名称:Intellij-Plugin,代码行数:21,代码来源:GaugeCommandLineState.java

示例2: showMavenToolWindow

import com.intellij.execution.testframework.sm.SMTestRunnerConnectionUtil; //导入方法依赖的package包/类
public void showMavenToolWindow() {
    ConfigurationType configurationType = new JUnitConfigurationType();
    ConfigurationFactory configurationFactory = new ConfigurationFactoryEx<JUnitConfiguration>(configurationType) {
        @NotNull
        @Override
        public RunConfiguration createTemplateConfiguration(@NotNull Project project) {
            return new JUnitConfiguration(project.getName(), project, this);
        }
    };
    JUnitConfiguration configuration = new JUnitConfiguration(project.getName(), project, configurationFactory);
    Executor executor = new DefaultRunExecutor();
    ProcessHandler processHandler = new NopProcessHandler();
    TestConsoleProperties consoleProperties = new MavenTestConsoleProperties(mavenProject, project, executor, configuration, processHandler);
    BaseTestsOutputConsoleView consoleView;
    try {
        consoleView = SMTestRunnerConnectionUtil.createAndAttachConsole(TOOL_WINDOW_ID, processHandler, consoleProperties);
    } catch (ExecutionException e) {
        throw new RuntimeException(e);
    }
    showInToolWindow(consoleView, mavenProject.getFinalName());
    processHandler.startNotify();
}
 
开发者ID:destin,项目名称:maven-test-support-plugin,代码行数:23,代码来源:MavenToolWindow.java

示例3: attachConsole

import com.intellij.execution.testframework.sm.SMTestRunnerConnectionUtil; //导入方法依赖的package包/类
@NotNull
@Override
protected ConsoleView attachConsole(AndroidRunningState state, Executor executor) throws ExecutionException {
  AndroidTestConsoleProperties properties = new AndroidTestConsoleProperties(this, executor);
  ConsoleView consoleView = SMTestRunnerConnectionUtil.createAndAttachConsole("Android", state.getProcessHandler(), properties);
  Disposer.register(state.getFacet().getModule().getProject(), consoleView);
  return consoleView;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:AndroidTestRunConfiguration.java

示例4: attachExecutionConsole

import com.intellij.execution.testframework.sm.SMTestRunnerConnectionUtil; //导入方法依赖的package包/类
@NotNull
@Override
public ExecutionConsole attachExecutionConsole(@NotNull final ExternalSystemTask task,
                                               @NotNull final Project project,
                                               @NotNull final ExternalSystemRunConfiguration configuration,
                                               @NotNull final Executor executor,
                                               @NotNull final ExecutionEnvironment env,
                                               @NotNull final ProcessHandler processHandler) throws ExecutionException {
  final GradleConsoleProperties properties = new GradleConsoleProperties(configuration, executor);
  myExecutionConsole = (SMTRunnerConsoleView)SMTestRunnerConnectionUtil.createAndAttachConsole(
    configuration.getSettings().getExternalSystemId().getReadableName(), processHandler, properties);

  TestTreeRenderer originalRenderer =
    ObjectUtils.tryCast(myExecutionConsole.getResultsViewer().getTreeView().getCellRenderer(), TestTreeRenderer.class);
  if (originalRenderer != null) {
    originalRenderer.setAdditionalRootFormatter(new SMRootTestProxyFormatter() {
      @Override
      public void format(@NotNull SMTestProxy.SMRootTestProxy testProxy, @NotNull TestTreeRenderer renderer) {
        final TestStateInfo.Magnitude magnitude = testProxy.getMagnitudeInfo();
        if (magnitude == TestStateInfo.Magnitude.RUNNING_INDEX) {
          renderer.clear();
          renderer.append(GradleBundle.message(
                            "gradle.test.runner.ui.tests.tree.presentation.labels.waiting.tests"),
                          SimpleTextAttributes.REGULAR_ATTRIBUTES
          );
        }
        else if (!testProxy.isInProgress() && testProxy.isEmptySuite()) {
          renderer.clear();
          renderer.append(GradleBundle.message(
                            "gradle.test.runner.ui.tests.tree.presentation.labels.no.tests.were.found"),
                          SimpleTextAttributes.REGULAR_ATTRIBUTES
          );
        }
      }
    });
  }
  return myExecutionConsole;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:39,代码来源:GradleTestsExecutionConsoleManager.java

示例5: getStockConsoleProvider

import com.intellij.execution.testframework.sm.SMTestRunnerConnectionUtil; //导入方法依赖的package包/类
private ConsoleProvider getStockConsoleProvider() {
  return (parent, handler, executor) -> {
    AndroidTestConsoleProperties properties =
        new AndroidTestConsoleProperties(runConfiguration, executor);
    ConsoleView consoleView =
        SMTestRunnerConnectionUtil.createAndAttachConsole("Android", handler, properties);
    Disposer.register(parent, consoleView);
    return consoleView;
  };
}
 
开发者ID:bazelbuild,项目名称:intellij,代码行数:11,代码来源:AndroidTestConsoleProvider.java

示例6: execute

import com.intellij.execution.testframework.sm.SMTestRunnerConnectionUtil; //导入方法依赖的package包/类
@Nullable
@Override
public ExecutionResult execute(Executor executor, @NotNull ProgramRunner runner)
    throws ExecutionException {
  final ProcessHandler processHandler = runBuildCommand(executor);
  final TestConsoleProperties properties =
      new BuckTestConsoleProperties(
          processHandler, mProject, mConfiguration, "Buck test", executor);
  final ConsoleView console =
      SMTestRunnerConnectionUtil.createAndAttachConsole("buck test", processHandler, properties);
  return new DefaultExecutionResult(console, processHandler, AnAction.EMPTY_ARRAY);
}
 
开发者ID:facebook,项目名称:buck,代码行数:13,代码来源:TestExecutionState.java


注:本文中的com.intellij.execution.testframework.sm.SMTestRunnerConnectionUtil.createAndAttachConsole方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。