本文整理汇总了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();
}
示例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();
}
示例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();
}
示例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);
}