fixed [IDEADEV-41319] test runner: do not show green balloon and green progress bar...
[fedora-idea.git] / platform / testRunner / src / com / intellij / execution / testframework / LvcsHelper.java
blobd7c41752bdd23db770c02cb720595157f272ffe0
1 /*
2 * Copyright 2000-2009 JetBrains s.r.o.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 * User: anna
19 * Date: 25-May-2007
21 package com.intellij.execution.testframework;
23 import com.intellij.execution.ExecutionBundle;
24 import com.intellij.history.LocalHistory;
26 import java.awt.*;
28 public class LvcsHelper {
29 private static final Color RED = new Color(250, 220, 220);
30 private static final Color GREEN = new Color(220, 250, 220);
32 public static void addLabel(final TestFrameworkRunningModel model) {
33 String label;
34 int color;
36 if (model.getRoot().isDefect()) {
37 color = RED.getRGB();
38 label = ExecutionBundle.message("junit.runing.info.tests.failed.label");
40 else {
41 color = GREEN.getRGB();
42 label = ExecutionBundle.message("junit.runing.info.tests.passed.label");
44 final TestConsoleProperties consoleProperties = model.getProperties();
45 String name = label + " " + consoleProperties.getConfiguration().getName();
46 LocalHistory.putSystemLabel(consoleProperties.getProject(), name, color);