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


Java ColoredTableCellRenderer.append方法代码示例

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


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

示例1: appendTestStatusColorPresentation

import com.intellij.ui.ColoredTableCellRenderer; //导入方法依赖的package包/类
public static void appendTestStatusColorPresentation(final SMTestProxy proxy,
                                                     final ColoredTableCellRenderer renderer) {
  final String title = getTestStatusPresentation(proxy);

  final TestStateInfo.Magnitude info = proxy.getMagnitudeInfo();
  switch (info) {
    case COMPLETE_INDEX:
    case PASSED_INDEX:
      renderer.append(title, PASSED_ATTRIBUTES);
      break;
    case RUNNING_INDEX:
      renderer.append(title, SimpleTextAttributes.REGULAR_BOLD_ATTRIBUTES);
      break;
    case NOT_RUN_INDEX:
      renderer.append(title, SimpleTextAttributes.GRAYED_BOLD_ATTRIBUTES);
      break;
    case IGNORED_INDEX:
    case SKIPPED_INDEX:
      renderer.append(title, SimpleTextAttributes.EXCLUDED_ATTRIBUTES);
      break;
    case ERROR_INDEX:
    case FAILED_INDEX:
      renderer.append(title, DEFFECT_ATTRIBUTES);
      break;
    case TERMINATED_INDEX:
      renderer.append(title, TERMINATED_ATTRIBUTES);
      break;
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:30,代码来源:TestsPresentationUtil.java

示例2: handleDefaultValue

import com.intellij.ui.ColoredTableCellRenderer; //导入方法依赖的package包/类
@Override
protected boolean handleDefaultValue(VirtualFile file, ColoredTableCellRenderer renderer) {
  final Language language = TemplateDataLanguagePatterns.getInstance().getTemplateDataLanguageByFileName(file);
  if (language != null) {
    renderer.append(visualize(language), SimpleTextAttributes.GRAY_ITALIC_ATTRIBUTES);
    return true;
  }
  return false;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:TemplateDataLanguageConfigurable.java

示例3: appendSuiteStatusColorPresentation

import com.intellij.ui.ColoredTableCellRenderer; //导入方法依赖的package包/类
public static void appendSuiteStatusColorPresentation(final SMTestProxy proxy,
                                                      final ColoredTableCellRenderer renderer) {
  int passedCount = 0;
  int errorsCount = 0;
  int failedCount = 0;
  int ignoredCount = 0;

  if (proxy.isLeaf()) {
    // If suite is empty show <no tests> label and exit from method
    renderer.append(RESULTS_NO_TESTS, proxy.wasLaunched() ? PASSED_ATTRIBUTES : DEFFECT_ATTRIBUTES);
    return;
  }

  final List<SMTestProxy> allTestCases = proxy.getAllTests();
  for (SMTestProxy testOrSuite : allTestCases) {
    // we should ignore test suites
    if (testOrSuite.isSuite()) {
      continue;
    }
    // if test check it state
    switch (testOrSuite.getMagnitudeInfo()) {
      case COMPLETE_INDEX:
      case PASSED_INDEX:
        passedCount++;
        break;
      case ERROR_INDEX:
        errorsCount++;
        break;
      case FAILED_INDEX:
        failedCount++;
        break;
      case IGNORED_INDEX:
      case SKIPPED_INDEX:
        ignoredCount++;
        break;
      case NOT_RUN_INDEX:
      case TERMINATED_INDEX:
      case RUNNING_INDEX:
        //Do nothing
        break;
    }
  }

  final String separator = " ";

  if (failedCount > 0) {
    renderer.append(SMTestsRunnerBundle.message(
        "sm.test.runner.ui.tabs.statistics.columns.results.count.msg.failed",
                                    failedCount) + separator,
                    DEFFECT_ATTRIBUTES);
  }

  if (errorsCount > 0) {
    renderer.append(SMTestsRunnerBundle.message(
        "sm.test.runner.ui.tabs.statistics.columns.results.count.msg.errors",
                                    errorsCount) + separator,
                    DEFFECT_ATTRIBUTES);
  }

  if (ignoredCount > 0) {
    renderer.append(SMTestsRunnerBundle.message(
        "sm.test.runner.ui.tabs.statistics.columns.results.count.msg.ignored",
                                    ignoredCount) + separator,
                    SimpleTextAttributes.GRAYED_BOLD_ATTRIBUTES);
  }

  if (passedCount > 0) {
    renderer.append(SMTestsRunnerBundle.message(
        "sm.test.runner.ui.tabs.statistics.columns.results.count.msg.passed",
                                    passedCount),
                    PASSED_ATTRIBUTES);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:74,代码来源:TestsPresentationUtil.java

示例4: renderValue

import com.intellij.ui.ColoredTableCellRenderer; //导入方法依赖的package包/类
public void renderValue(ColoredTableCellRenderer cellRenderer, boolean isNodeExpanded) {
    if (!isNodeExpanded) {
        cellRenderer.append(getValueAndAbbreviateIfNecessary(), valueTextAttributes);
    }
}
 
开发者ID:dboissier,项目名称:nosql4idea,代码行数:6,代码来源:MongoKeyValueDescriptor.java

示例5: renderValue

import com.intellij.ui.ColoredTableCellRenderer; //导入方法依赖的package包/类
public void renderValue(ColoredTableCellRenderer cellRenderer, boolean isNodeExpanded) {
    if (!isNodeExpanded) {
        cellRenderer.append(getFormattedValue(), valueTextAttributes);
    }
}
 
开发者ID:dboissier,项目名称:nosql4idea,代码行数:6,代码来源:MongoValueDescriptor.java

示例6: renderValue

import com.intellij.ui.ColoredTableCellRenderer; //导入方法依赖的package包/类
@Override
public void renderValue(ColoredTableCellRenderer cellRenderer, boolean isNodeExpanded) {
    if (!isNodeExpanded) {
        cellRenderer.append(getFormattedValue(), valueTextAttributes);
    }
}
 
开发者ID:dboissier,项目名称:nosql4idea,代码行数:7,代码来源:RedisValueDescriptor.java

示例7: appendSuiteStatusColorPresentation

import com.intellij.ui.ColoredTableCellRenderer; //导入方法依赖的package包/类
public static void appendSuiteStatusColorPresentation(final SMTestProxy proxy,
                                                      final ColoredTableCellRenderer renderer) {
  int passedCount = 0;
  int errorsCount = 0;
  int failedCount = 0;
  int ignoredCount = 0;

  if (proxy.isLeaf()) {
    // If suite is empty show <no tests> label and exit from method
    renderer.append(RESULTS_NO_TESTS, proxy.wasLaunched() ? PASSED_ATTRIBUTES : DEFFECT_ATTRIBUTES);
    return;
  }

  final List<SMTestProxy> allTestCases = proxy.getAllTests();
  for (SMTestProxy testOrSuite : allTestCases) {
    // we should ignore test suites
    if (testOrSuite.isSuite()) {
      continue;
    }
    // if test check it state
    switch (testOrSuite.getMagnitudeInfo()) {
      case COMPLETE_INDEX:
      case PASSED_INDEX:
        passedCount++;
        break;
      case ERROR_INDEX:
        errorsCount++;
        break;
      case FAILED_INDEX:
        failedCount++;
        break;
      case IGNORED_INDEX:
      case SKIPPED_INDEX:
        ignoredCount++;
        break;
      case NOT_RUN_INDEX:
      case TERMINATED_INDEX:
      case RUNNING_INDEX:
        //Do nothing
        break;
    }
  }

  final String separator = " ";

  if (failedCount > 0) {
    renderer.append(SMTestsRunnerBundle.message(
            "sm.test.runner.ui.tabs.statistics.columns.results.count.msg.failed",
            failedCount) + separator,
                    DEFFECT_ATTRIBUTES);
  }

  if (errorsCount > 0) {
    renderer.append(SMTestsRunnerBundle.message(
            "sm.test.runner.ui.tabs.statistics.columns.results.count.msg.errors",
            errorsCount) + separator,
                    DEFFECT_ATTRIBUTES);
  }

  if (ignoredCount > 0) {
    renderer.append(SMTestsRunnerBundle.message(
            "sm.test.runner.ui.tabs.statistics.columns.results.count.msg.ignored",
            ignoredCount) + separator,
                    SimpleTextAttributes.GRAYED_BOLD_ATTRIBUTES);
  }

  if (passedCount > 0) {
    renderer.append(SMTestsRunnerBundle.message(
            "sm.test.runner.ui.tabs.statistics.columns.results.count.msg.passed",
            passedCount),
                    PASSED_ATTRIBUTES);
  }
}
 
开发者ID:consulo,项目名称:consulo,代码行数:74,代码来源:TestsPresentationUtil.java


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