Java Code Examples for com.intellij.ui.ColoredTableCellRenderer#append()
The following examples show how to use
com.intellij.ui.ColoredTableCellRenderer#append() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TestsPresentationUtil.java From consulo with Apache License 2.0 | 5 votes |
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; } }
Example 2
Source File: TemplateDataLanguageConfigurable.java From consulo with Apache License 2.0 | 5 votes |
@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; }
Example 3
Source File: MongoKeyValueDescriptor.java From nosql4idea with Apache License 2.0 | 4 votes |
public void renderValue(ColoredTableCellRenderer cellRenderer, boolean isNodeExpanded) { if (!isNodeExpanded) { cellRenderer.append(getValueAndAbbreviateIfNecessary(), valueTextAttributes); } }
Example 4
Source File: MongoValueDescriptor.java From nosql4idea with Apache License 2.0 | 4 votes |
public void renderValue(ColoredTableCellRenderer cellRenderer, boolean isNodeExpanded) { if (!isNodeExpanded) { cellRenderer.append(getFormattedValue(), valueTextAttributes); } }
Example 5
Source File: RedisValueDescriptor.java From nosql4idea with Apache License 2.0 | 4 votes |
@Override public void renderValue(ColoredTableCellRenderer cellRenderer, boolean isNodeExpanded) { if (!isNodeExpanded) { cellRenderer.append(getFormattedValue(), valueTextAttributes); } }
Example 6
Source File: RedisKeyValueDescriptor.java From nosql4idea with Apache License 2.0 | 4 votes |
@Override public void renderValue(ColoredTableCellRenderer cellRenderer, boolean isNodeExpanded) { if (!isNodeExpanded) { cellRenderer.append(getFormattedValue(), valueTextAttributes); } }
Example 7
Source File: CouchbaseValueDescriptor.java From nosql4idea with Apache License 2.0 | 4 votes |
public void renderValue(ColoredTableCellRenderer cellRenderer, boolean isNodeExpanded) { if (!isNodeExpanded) { cellRenderer.append(getFormattedValue(), valueTextAttributes); } }
Example 8
Source File: CouchbaseKeyValueDescriptor.java From nosql4idea with Apache License 2.0 | 4 votes |
public void renderValue(ColoredTableCellRenderer cellRenderer, boolean isNodeExpanded) { if (!isNodeExpanded) { cellRenderer.append(getValueAndAbbreviateIfNecessary(), valueTextAttributes); } }
Example 9
Source File: TestsPresentationUtil.java From consulo with Apache License 2.0 | 4 votes |
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); } }