本文整理汇总了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;
}
}
示例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;
}
示例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);
}
}
示例4: renderValue
import com.intellij.ui.ColoredTableCellRenderer; //导入方法依赖的package包/类
public void renderValue(ColoredTableCellRenderer cellRenderer, boolean isNodeExpanded) {
if (!isNodeExpanded) {
cellRenderer.append(getValueAndAbbreviateIfNecessary(), valueTextAttributes);
}
}
示例5: renderValue
import com.intellij.ui.ColoredTableCellRenderer; //导入方法依赖的package包/类
public void renderValue(ColoredTableCellRenderer cellRenderer, boolean isNodeExpanded) {
if (!isNodeExpanded) {
cellRenderer.append(getFormattedValue(), valueTextAttributes);
}
}
示例6: renderValue
import com.intellij.ui.ColoredTableCellRenderer; //导入方法依赖的package包/类
@Override
public void renderValue(ColoredTableCellRenderer cellRenderer, boolean isNodeExpanded) {
if (!isNodeExpanded) {
cellRenderer.append(getFormattedValue(), valueTextAttributes);
}
}
示例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);
}
}