本文整理汇总了Java中com.intellij.execution.testframework.CompositePrintable类的典型用法代码示例。如果您正苦于以下问题:Java CompositePrintable类的具体用法?Java CompositePrintable怎么用?Java CompositePrintable使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
CompositePrintable类属于com.intellij.execution.testframework包,在下文中一共展示了CompositePrintable类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: printError
import com.intellij.execution.testframework.CompositePrintable; //导入依赖的package包/类
private static void printError(@NotNull final Printer printer,
@NotNull final List<String> errorPresentationText,
final boolean setMark)
{
boolean addMark = setMark;
for (final String errorText : errorPresentationText) {
if (errorText != null) {
printer.print(CompositePrintable.NEW_LINE, ConsoleViewContentType.ERROR_OUTPUT);
if (addMark) {
printer.mark();
addMark = false;
}
TestsPresentationUtil.printWithAnsiColoring(printer, errorText, ProcessOutputTypes.STDERR);
}
}
}
示例2: printOn
import com.intellij.execution.testframework.CompositePrintable; //导入依赖的package包/类
@Override
public void printOn(Printer printer) {
printer.print(CompositePrintable.NEW_LINE, ConsoleViewContentType.ERROR_OUTPUT);
printer.mark();
// Error msg
TestsPresentationUtil.printWithAnsiColoring(printer, myErrorMsgPresentation, ProcessOutputTypes.STDERR);
// Diff link
myHyperlink.printOn(printer);
// Stacktrace
printer.print(CompositePrintable.NEW_LINE, ConsoleViewContentType.ERROR_OUTPUT);
TestsPresentationUtil.printWithAnsiColoring(printer, myStacktracePresentation, ProcessOutputTypes.STDERR);
printer.print(CompositePrintable.NEW_LINE, ConsoleViewContentType.ERROR_OUTPUT);
}
示例3: printError
import com.intellij.execution.testframework.CompositePrintable; //导入依赖的package包/类
private static void printError(@NotNull final Printer printer,
@NotNull final List<String> errorPresentationText,
final boolean setMark)
{
boolean addMark = setMark;
for (final String errorText : errorPresentationText) {
if (errorText != null) {
printer.print(CompositePrintable.NEW_LINE, ConsoleViewContentType.ERROR_OUTPUT);
if (addMark) {
printer.mark();
addMark = false;
}
printer.print(errorText, ConsoleViewContentType.ERROR_OUTPUT);
}
}
}
示例4: printOn
import com.intellij.execution.testframework.CompositePrintable; //导入依赖的package包/类
@Override
public void printOn(Printer printer) {
printer.print(CompositePrintable.NEW_LINE, ConsoleViewContentType.ERROR_OUTPUT);
printer.mark();
// Error msg
if (myErrorMsgPresentation != null) {
printer.print(myErrorMsgPresentation, ConsoleViewContentType.ERROR_OUTPUT);
}
// Diff link
myHyperlink.printOn(printer);
// Stacktrace
if (myStacktracePresentation != null) {
printer.print(CompositePrintable.NEW_LINE, ConsoleViewContentType.ERROR_OUTPUT);
printer.print(myStacktracePresentation, ConsoleViewContentType.ERROR_OUTPUT);
printer.print(CompositePrintable.NEW_LINE, ConsoleViewContentType.ERROR_OUTPUT);
}
}
示例5: printOn
import com.intellij.execution.testframework.CompositePrintable; //导入依赖的package包/类
@Override
public void printOn(Printer printer) {
printer.print(CompositePrintable.NEW_LINE, ConsoleViewContentType.ERROR_OUTPUT);
printer.mark();
// Error msg
printer.printWithAnsiColoring(myErrorMsgPresentation, ProcessOutputTypes.STDERR);
// Diff link
myHyperlink.printOn(printer);
// Stacktrace
printer.print(CompositePrintable.NEW_LINE, ConsoleViewContentType.ERROR_OUTPUT);
printer.printWithAnsiColoring(myStacktracePresentation, ProcessOutputTypes.STDERR);
printer.print(CompositePrintable.NEW_LINE, ConsoleViewContentType.ERROR_OUTPUT);
}
示例6: buildErrorPresentationText
import com.intellij.execution.testframework.CompositePrintable; //导入依赖的package包/类
@Nullable
public static String buildErrorPresentationText(@Nullable final String localizedMessage,
@Nullable final String stackTrace)
{
final String text = (StringUtil.isEmptyOrSpaces(localizedMessage) ? "" : localizedMessage + CompositePrintable.NEW_LINE) +
(StringUtil.isEmptyOrSpaces(stackTrace) ? "" : stackTrace + CompositePrintable.NEW_LINE);
return StringUtil.isEmptyOrSpaces(text) ? null : text;
}
示例7: printOn
import com.intellij.execution.testframework.CompositePrintable; //导入依赖的package包/类
@Override
public void printOn(final Printer printer) {
super.printOn(printer);
final String msg = EMPTY_SUITE_TEXT + CompositePrintable.NEW_LINE;
printer.print(msg, ConsoleViewContentType.SYSTEM_OUTPUT);
}
示例8: TestIgnoredState
import com.intellij.execution.testframework.CompositePrintable; //导入依赖的package包/类
public TestIgnoredState(@Nullable String ignoredMsg, @Nullable final String stackTrace) {
if (StringUtil.isEmpty(ignoredMsg)) {
myText = null;
}
else {
myText = CompositePrintable.NEW_LINE + ignoredMsg;
}
myStacktrace = stackTrace == null ? null : stackTrace + CompositePrintable.NEW_LINE;
}
示例9: printOn
import com.intellij.execution.testframework.CompositePrintable; //导入依赖的package包/类
@Override
public void printOn(final Printer printer) {
super.printOn(printer);
if (myText != null) {
printer.print(myText, ConsoleViewContentType.SYSTEM_OUTPUT);
}
if (!StringUtil.isEmptyOrSpaces(myStacktrace)) {
printer.print(CompositePrintable.NEW_LINE, ConsoleViewContentType.ERROR_OUTPUT);
printer.mark();
printer.print(myStacktrace, ConsoleViewContentType.ERROR_OUTPUT);
}
}
示例10: printOn
import com.intellij.execution.testframework.CompositePrintable; //导入依赖的package包/类
public void printOn(final Printer printer) {
printer.print(CompositePrintable.NEW_LINE, ConsoleViewContentType.ERROR_OUTPUT);
printer.mark();
for (int i = 0; i < myMessages.size(); i++) {
printExceptionHeader(printer, myMessages.get(i));
if (i < myStackTraces.size()) {
printer.print(myStackTraces.get(i) + CompositePrintable.NEW_LINE, ConsoleViewContentType.ERROR_OUTPUT);
}
}
}
示例11: printOn
import com.intellij.execution.testframework.CompositePrintable; //导入依赖的package包/类
public void printOn(final Printer printer) {
String parentName = myPeformedTest.getParent() == null ? myPeformedTest.getInfo().getComment() : myPeformedTest.getParent().toString();
String message = ExecutionBundle.message("junit.runing.info.ignored.console.message", parentName, myPeformedTest.getInfo().getName());
printer.print(message + (myIgnoredMessage.length() > 0 ? " (" + myIgnoredMessage + ")": "") + CompositePrintable.NEW_LINE, ConsoleViewContentType.ERROR_OUTPUT);
if (myMessage.length() > 0) {
printer.print(myMessage + CompositePrintable.NEW_LINE, ConsoleViewContentType.ERROR_OUTPUT);
}
if (myStackTrace.length() > 0) {
printer.print(myStackTrace + CompositePrintable.NEW_LINE, ConsoleViewContentType.ERROR_OUTPUT);
}
}
示例12: printOn
import com.intellij.execution.testframework.CompositePrintable; //导入依赖的package包/类
@Override
public void printOn(final Printer printer) {
super.printOn(printer);
printer.print(myText, ConsoleViewContentType.SYSTEM_OUTPUT);
if (StringUtil.isEmptyOrSpaces(myStacktrace)) {
printer.print(CompositePrintable.NEW_LINE, ConsoleViewContentType.SYSTEM_OUTPUT);
}
else {
printer.print(CompositePrintable.NEW_LINE, ConsoleViewContentType.ERROR_OUTPUT);
printer.mark();
printer.print(myStacktrace, ConsoleViewContentType.ERROR_OUTPUT);
}
}
示例13: printError
import com.intellij.execution.testframework.CompositePrintable; //导入依赖的package包/类
private static void printError(@Nonnull final Printer printer, @Nonnull final List<String> errorPresentationText, final boolean setMark) {
boolean addMark = setMark;
for (final String errorText : errorPresentationText) {
if (errorText != null) {
printer.print(CompositePrintable.NEW_LINE, ConsoleViewContentType.ERROR_OUTPUT);
if (addMark) {
printer.mark();
addMark = false;
}
printer.printWithAnsiColoring(errorText, ProcessOutputTypes.STDERR);
}
}
}
示例14: printOn
import com.intellij.execution.testframework.CompositePrintable; //导入依赖的package包/类
public void printOn(final Printer printer) {
printer.print(Formatters.printTest(myPeformedTest) + ":" + CompositePrintable.NEW_LINE,
ConsoleViewContentType.SYSTEM_OUTPUT);
myPeformedTest.printOn(printer);
}
示例15: TestIgnoredState
import com.intellij.execution.testframework.CompositePrintable; //导入依赖的package包/类
public TestIgnoredState(final String ignoredComment, @Nullable final String stackTrace) {
final String ignored_msg = StringUtil.isEmpty(ignoredComment) ? IGNORED_TEST_TEXT : ignoredComment;
myText = CompositePrintable.NEW_LINE + ignored_msg;
myStacktrace = stackTrace == null ? null : stackTrace + CompositePrintable.NEW_LINE;
}