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


Java CompositePrintable类代码示例

本文整理汇总了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);
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:TestFailedState.java

示例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);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:TestComparisionFailedState.java

示例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);
    }
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:17,代码来源:TestFailedState.java

示例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);
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:22,代码来源:TestComparisionFailedState.java

示例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);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:17,代码来源:TestComparisionFailedState.java

示例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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:TestFailedState.java

示例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);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:SuiteFinishedState.java

示例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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:TestIgnoredState.java

示例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);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:TestIgnoredState.java

示例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);
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:FaultyState.java

示例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);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:IgnoredState.java

示例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);
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:15,代码来源:TestIgnoredState.java

示例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);
    }
  }
}
 
开发者ID:consulo,项目名称:consulo,代码行数:14,代码来源:TestFailedState.java

示例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);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:SkippedState.java

示例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;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:6,代码来源:TestIgnoredState.java


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