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


Java SMTestRunnerConnectionUtil.createConsole方法代码示例

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


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

示例1: getConsoleView

import com.intellij.execution.testframework.sm.SMTestRunnerConnectionUtil; //导入方法依赖的package包/类
public static SMTRunnerConsoleView getConsoleView(
    Project project,
    BlazeCommandRunConfiguration configuration,
    Executor executor,
    BlazeTestUiSession testUiSession) {
  SMTRunnerConsoleProperties properties =
      new BlazeTestConsoleProperties(configuration, executor, testUiSession);
  SMTRunnerConsoleView console =
      (SMTRunnerConsoleView)
          SMTestRunnerConnectionUtil.createConsole(BLAZE_FRAMEWORK, properties);
  Disposer.register(project, console);
  console
      .getResultsViewer()
      .getTreeView()
      .getSelectionModel()
      .setSelectionMode(TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION);
  return console;
}
 
开发者ID:bazelbuild,项目名称:intellij,代码行数:19,代码来源:SmRunnerUtils.java

示例2: createConsole

import com.intellij.execution.testframework.sm.SMTestRunnerConnectionUtil; //导入方法依赖的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

示例3: execute

import com.intellij.execution.testframework.sm.SMTestRunnerConnectionUtil; //导入方法依赖的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: execute

import com.intellij.execution.testframework.sm.SMTestRunnerConnectionUtil; //导入方法依赖的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

示例5: createRunState

import com.intellij.execution.testframework.sm.SMTestRunnerConnectionUtil; //导入方法依赖的package包/类
@NotNull
@Override
protected NodeJSRunState createRunState(@NotNull Module module,
		@NotNull Sdk targetSdk,
		@NotNull final Executor executor,
		@NotNull final ExecutionEnvironment executionEnvironment) throws ExecutionException
{
	VirtualFile mocha = NpmRunUtil.findNpmModule(module, MochaPsiElementUtil.MOCHA);
	if(mocha == null)
	{
		throw new ExecutionException("'mocha' module is not installed");
	}

	VirtualFile fileOrDirectory = getFileOrDirectory();
	if(fileOrDirectory == null)
	{
		throw new ExecutionException((myTargetType == TargetType.DIRECTORY ? "Directory" : "File") + " is not set");
	}

	NodeJSRunState state = new NodeJSRunState(module, targetSdk, this)
	{
		@NotNull
		@Override
		public ConsoleView createConsole(OSProcessHandler processHandler)
		{
			SMTRunnerConsoleProperties testConsoleProperties = new SMTRunnerConsoleProperties(MochaConfiguration.this, "Mocha", executor);
			testConsoleProperties.setIdBasedTestTree(true);

			testConsoleProperties.setIfUndefined(TestConsoleProperties.HIDE_PASSED_TESTS, false);

			return SMTestRunnerConnectionUtil.createConsole("Mocha", testConsoleProperties);
		}
	};
	state.addArgument(mocha.getPath() + "/bin/_mocha");

	File pluginPath = PluginManager.getPluginPath(MochaConfiguration.class);

	File mochaReporter = new File(pluginPath, "mocha-consulo");
	if(mochaReporter.exists())
	{
		state.addArgument("--reporter");
		state.addArgument(new File(mochaReporter, "lib/mochaIntellijReporter.js").getPath());

		state.addArgument("--ui");
		state.addArgument("bdd");
	}

	switch(myTargetType)
	{
		case DIRECTORY:
			state.addArgument("--recursive");
			state.addArgument(getDirectoryPath());
			break;
		case FILE:
			state.addArgument(getFilePath());
			break;
	}
	return state;
}
 
开发者ID:consulo,项目名称:consulo-nodejs,代码行数:60,代码来源:MochaConfiguration.java


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