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


Java BaseTestsOutputConsoleView.attachToProcess方法代码示例

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


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

示例1: createConsole

import com.intellij.execution.testframework.ui.BaseTestsOutputConsoleView; //导入方法依赖的package包/类
public static ConsoleView createConsole(Project project, ProcessHandler processHandler, ExecutionEnvironment executionEnvironment, TesterTestLocator locationProvider) {
    TesterRunConfiguration profile = (TesterRunConfiguration) executionEnvironment.getRunProfile();

    TesterConsoleProperties properties = new TesterConsoleProperties(profile, executionEnvironment.getExecutor(), locationProvider);
    properties.addStackTraceFilter(new XdebugCallStackFilter(project, locationProvider.getPathMapper()));

    BaseTestsOutputConsoleView testsOutputConsoleView = SMTestRunnerConnectionUtil.createConsole("Nette Tester", properties);
    testsOutputConsoleView.addMessageFilter(new TesterStackTraceFilter(project, locationProvider.getPathMapper()));
    testsOutputConsoleView.attachToProcess(processHandler);
    Disposer.register(project, testsOutputConsoleView);
    return testsOutputConsoleView;
}
 
开发者ID:jiripudil,项目名称:intellij-nette-tester,代码行数:13,代码来源:TesterExecutionUtil.java

示例2: createAndAttachConsole

import com.intellij.execution.testframework.ui.BaseTestsOutputConsoleView; //导入方法依赖的package包/类
/** @deprecated use {@link #createAndAttachConsole(String, ProcessHandler, TestConsoleProperties)} (to be removed in IDEA 16) */
@SuppressWarnings({"unused", "deprecation"})
public static BaseTestsOutputConsoleView createAndAttachConsole(@NotNull String testFrameworkName,
                                                                @NotNull ProcessHandler processHandler,
                                                                @NotNull TestConsoleProperties consoleProperties,
                                                                ExecutionEnvironment environment) throws ExecutionException {
  BaseTestsOutputConsoleView console = createConsole(testFrameworkName, consoleProperties, environment);
  console.attachToProcess(processHandler);
  return console;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:SMTestRunnerConnectionUtil.java

示例3: execute

import com.intellij.execution.testframework.ui.BaseTestsOutputConsoleView; //导入方法依赖的package包/类
@Nullable
@Override
public ExecutionResult execute(Executor executor, @NotNull ProgramRunner runner) throws ExecutionException {
  final MyEmptyProcessHandler handler = new MyEmptyProcessHandler();
  final SMTRunnerConsoleProperties properties = myRunProfile.getProperties();
  RunProfile configuration;
  final String frameworkName;
  if (properties != null) {
    configuration = properties.getConfiguration();
    frameworkName = properties.getTestFrameworkName();
  }
  else {
    configuration = myRunProfile;
    frameworkName = "Import Test Results";
  }
  final ImportedTestConsoleProperties consoleProperties = new ImportedTestConsoleProperties(properties, myFile, handler, myRunProfile.getProject(),
                                                                                            configuration, frameworkName, executor);
  final BaseTestsOutputConsoleView console = SMTestRunnerConnectionUtil.createConsole(consoleProperties.getTestFrameworkName(), 
                                                                                      consoleProperties);
  final JComponent component = console.getComponent();
  AbstractRerunFailedTestsAction rerunFailedTestsAction = null;
  if (component instanceof TestFrameworkRunningModel) {
    rerunFailedTestsAction = consoleProperties.createRerunFailedTestsAction(console);
    if (rerunFailedTestsAction != null) {
      rerunFailedTestsAction.setModelProvider(new Getter<TestFrameworkRunningModel>() {
        @Override
        public TestFrameworkRunningModel get() {
          return (TestFrameworkRunningModel)component;
        }
      });
    }
  }
  
  console.attachToProcess(handler);
  final DefaultExecutionResult result = new DefaultExecutionResult(console, handler);
  if (rerunFailedTestsAction != null) {
    result.setRestartActions(rerunFailedTestsAction);
  }
  return result;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:41,代码来源:ImportedTestRunnableState.java

示例4: createAndAttachConsole

import com.intellij.execution.testframework.ui.BaseTestsOutputConsoleView; //导入方法依赖的package包/类
/**
 * @deprecated use {@link #createAndAttachConsole(String, ProcessHandler, TestConsoleProperties)} (to be removed in IDEA 16)
 */
@SuppressWarnings({"unused", "deprecation"})
public static BaseTestsOutputConsoleView createAndAttachConsole(@Nonnull String testFrameworkName,
                                                                @Nonnull ProcessHandler processHandler,
                                                                @Nonnull TestConsoleProperties consoleProperties,
                                                                ExecutionEnvironment environment) throws ExecutionException {
  BaseTestsOutputConsoleView console = createConsole(testFrameworkName, consoleProperties, environment);
  console.attachToProcess(processHandler);
  return console;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:13,代码来源:SMTestRunnerConnectionUtil.java

示例5: execute

import com.intellij.execution.testframework.ui.BaseTestsOutputConsoleView; //导入方法依赖的package包/类
@Nullable
@Override
public ExecutionResult execute(Executor executor, @Nonnull ProgramRunner runner) throws ExecutionException {
  final MyEmptyProcessHandler handler = new MyEmptyProcessHandler();
  final SMTRunnerConsoleProperties properties = myRunProfile.getProperties();
  RunProfile configuration;
  final String frameworkName;
  if (properties != null) {
    configuration = properties.getConfiguration();
    frameworkName = properties.getTestFrameworkName();
  }
  else {
    configuration = myRunProfile;
    frameworkName = "Import Test Results";
  }
  final ImportedTestConsoleProperties consoleProperties = new ImportedTestConsoleProperties(properties, myFile, handler, myRunProfile.getProject(),
                                                                                            configuration, frameworkName, executor);
  final BaseTestsOutputConsoleView console = SMTestRunnerConnectionUtil.createConsole(consoleProperties.getTestFrameworkName(),
                                                                                      consoleProperties);
  final JComponent component = console.getComponent();
  AbstractRerunFailedTestsAction rerunFailedTestsAction = null;
  if (component instanceof TestFrameworkRunningModel) {
    rerunFailedTestsAction = consoleProperties.createRerunFailedTestsAction(console);
    if (rerunFailedTestsAction != null) {
      rerunFailedTestsAction.setModelProvider(new Getter<TestFrameworkRunningModel>() {
        @Override
        public TestFrameworkRunningModel get() {
          return (TestFrameworkRunningModel)component;
        }
      });
    }
  }

  console.attachToProcess(handler);
  final DefaultExecutionResult result = new DefaultExecutionResult(console, handler);
  if (rerunFailedTestsAction != null) {
    result.setRestartActions(rerunFailedTestsAction);
  }
  return result;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:41,代码来源:ImportedTestRunnableState.java

示例6: createAndAttachConsole

import com.intellij.execution.testframework.ui.BaseTestsOutputConsoleView; //导入方法依赖的package包/类
/**
 * Creates Test Runner console component with test tree, console, statistics tabs
 * and attaches it to given Process handler.
 *
 * You can use this method in run configuration's CommandLineState. You should
 * just override "execute" method of your custom command line state and return
 * test runner's console.
 *
 * NB: For debug purposes please enable "debug mode". In this mode test runner will also validate
 * consistency of test events communication protocol and throw assertion errors. To enable debug mode
 * please set system property idea.smrunner.debug=true
 *
 * @param testFrameworkName Is used to store(project level) latest value of testTree/consoleTab splitter and other settings
 * and also will be mentioned in debug diagnostics
 * @param processHandler Process handler
 * @param consoleProperties Console properties for test console actions
 * @return Console view
 * @throws ExecutionException If IDEA cannot execute process this Exception will
 * be caught and shown in error message box
 */
public static BaseTestsOutputConsoleView createAndAttachConsole(@NotNull final String testFrameworkName,
                                                                @NotNull final ProcessHandler processHandler,
                                                                @NotNull final TestConsoleProperties consoleProperties,
                                                                ExecutionEnvironment environment
) throws ExecutionException {
  BaseTestsOutputConsoleView console = createConsole(testFrameworkName, consoleProperties, environment);
  console.attachToProcess(processHandler);
  return console;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:30,代码来源:SMTestRunnerConnectionUtil.java


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