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


Java SMTRunnerConsoleView.addAttachToProcessListener方法代码示例

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


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

示例1: initConsoleView

import com.intellij.execution.testframework.sm.runner.ui.SMTRunnerConsoleView; //导入方法依赖的package包/类
public static void initConsoleView(@Nonnull final SMTRunnerConsoleView consoleView,
                                   @Nonnull final String testFrameworkName,
                                   @javax.annotation.Nullable final TestLocationProvider locator,
                                   final ThriftTestHandlerFactory factory,
                                   @javax.annotation.Nullable final TestProxyFilterProvider filterProvider) {
  consoleView.addAttachToProcessListener(new AttachToProcessListener() {
    @Override
    public void onAttachToProcess(@Nonnull ProcessHandler processHandler) {
      TestProxyPrinterProvider printerProvider = null;
      if (filterProvider != null) {
        printerProvider = new TestProxyPrinterProvider(consoleView, filterProvider);
      }
      SMTestRunnerResultsForm resultsForm = consoleView.getResultsViewer();
      attachEventsProcessors(consoleView.getProperties(), resultsForm, resultsForm.getStatisticsPane(), processHandler, testFrameworkName, locator, factory,
                             printerProvider);
    }
  });
  consoleView.setHelpId("reference.runToolWindow.testResultsTab");
  consoleView.initUI();
}
 
开发者ID:consulo,项目名称:consulo,代码行数:21,代码来源:ThriftTestExecutionUtil.java

示例2: initConsoleView

import com.intellij.execution.testframework.sm.runner.ui.SMTRunnerConsoleView; //导入方法依赖的package包/类
/**
 * @deprecated use {@link #initConsoleView(SMTRunnerConsoleView, String)} (to be removed in IDEA 16)
 */
@SuppressWarnings({"unused", "deprecation"})
public static void initConsoleView(@Nonnull final SMTRunnerConsoleView consoleView,
                                   @Nonnull final String testFrameworkName,
                                   @Nullable final TestLocationProvider locator,
                                   final boolean idBasedTreeConstruction,
                                   @javax.annotation.Nullable final TestProxyFilterProvider filterProvider) {
  consoleView.addAttachToProcessListener(new AttachToProcessListener() {
    @Override
    public void onAttachToProcess(@Nonnull ProcessHandler processHandler) {
      TestConsoleProperties properties = consoleView.getProperties();

      SMTestLocator testLocator = new CompositeTestLocationProvider(locator);

      TestProxyPrinterProvider printerProvider = null;
      if (filterProvider != null) {
        printerProvider = new TestProxyPrinterProvider(consoleView, filterProvider);
      }

      SMTestRunnerResultsForm resultsForm = consoleView.getResultsViewer();
      attachEventsProcessors(properties, resultsForm, resultsForm.getStatisticsPane(), processHandler, testFrameworkName, testLocator, idBasedTreeConstruction, printerProvider);
    }
  });
  consoleView.setHelpId("reference.runToolWindow.testResultsTab");
  consoleView.initUI();
}
 
开发者ID:consulo,项目名称:consulo,代码行数:29,代码来源:SMTestRunnerConnectionUtil.java

示例3: initConsoleView

import com.intellij.execution.testframework.sm.runner.ui.SMTRunnerConsoleView; //导入方法依赖的package包/类
/** @deprecated use {@link #initConsoleView(SMTRunnerConsoleView, String)} (to be removed in IDEA 16) */
@SuppressWarnings({"unused", "deprecation"})
public static void initConsoleView(@NotNull final SMTRunnerConsoleView consoleView,
                                   @NotNull final String testFrameworkName,
                                   @Nullable final TestLocationProvider locator,
                                   final boolean idBasedTreeConstruction,
                                   @Nullable final TestProxyFilterProvider filterProvider) {
  consoleView.addAttachToProcessListener(new AttachToProcessListener() {
    @Override
    public void onAttachToProcess(@NotNull ProcessHandler processHandler) {
      TestConsoleProperties properties = consoleView.getProperties();

      SMTestLocator testLocator = new CompositeTestLocationProvider(locator);

      TestProxyPrinterProvider printerProvider = null;
      if (filterProvider != null) {
        printerProvider = new TestProxyPrinterProvider(consoleView, filterProvider);
      }

      SMTestRunnerResultsForm resultsForm = consoleView.getResultsViewer();
      attachEventsProcessors(properties,
                             resultsForm,
                             resultsForm.getStatisticsPane(),
                             processHandler,
                             testFrameworkName,
                             testLocator,
                             idBasedTreeConstruction,
                             printerProvider);
    }
  });
  consoleView.setHelpId("reference.runToolWindow.testResultsTab");
  consoleView.initUI();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:34,代码来源:SMTestRunnerConnectionUtil.java

示例4: execute

import com.intellij.execution.testframework.sm.runner.ui.SMTRunnerConsoleView; //导入方法依赖的package包/类
@Nullable
@Override
@RequiredDispatchThread
public ExecutionResult execute(Executor executor, @NotNull ProgramRunner runner) throws ExecutionException
{
	Unity3dTestConfiguration profile = (Unity3dTestConfiguration) myEnvironment.getRunProfile();

	TestConsoleProperties testConsoleProperties = new SMTRunnerConsoleProperties(profile, TEST_FRAMEWORK_NAME, executor);

	testConsoleProperties.setIfUndefined(TestConsoleProperties.HIDE_PASSED_TESTS, false);

	String splitterPropertyName = SMTestRunnerConnectionUtil.getSplitterPropertyName(TEST_FRAMEWORK_NAME);

	final SMTRunnerConsoleView consoleView = new SMTRunnerConsoleView(testConsoleProperties, splitterPropertyName);

	final Ref<UUID> ref = Ref.create();

	consoleView.addAttachToProcessListener(new AttachToProcessListener()
	{
		@Override
		public void onAttachToProcess(@NotNull ProcessHandler processHandler)
		{
			SMTestRunnerResultsForm resultsForm = consoleView.getResultsViewer();

			ref.set(attachEventsProcessors(consoleView.getProperties(), resultsForm, resultsForm.getStatisticsPane(), processHandler, TEST_FRAMEWORK_NAME));
		}
	});
	consoleView.setHelpId("reference.runToolWindow.testResultsTab");
	consoleView.initUI();

	final ProcessHandler osProcessHandler = new DefaultDebugProcessHandler();

	consoleView.attachToProcess(osProcessHandler);

	UnityRunTest runTest = new UnityRunTest();
	runTest.uuid = ref.get().toString();
	runTest.type = "";

	if(!UnityEditorCommunication.request(profile.getProject(), runTest, true))
	{
		ApplicationManager.getApplication().executeOnPooledThread(new Runnable()
		{
			@Override
			public void run()
			{
				osProcessHandler.notifyTextAvailable("UnityEditor dont received request, maybe is not run", ProcessOutputTypes.STDERR);
				osProcessHandler.destroyProcess();
			}
		});
	}

	return new DefaultExecutionResult(consoleView, osProcessHandler);
}
 
开发者ID:consulo,项目名称:consulo-unity3d,代码行数:54,代码来源:Unity3dTestRunState.java


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