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