/*
 * Copyright 2000-2009 JetBrains s.r.o.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.intellij.xdebugger.impl.ui;

import com.intellij.icons.AllIcons;
import com.intellij.ui.DarculaColors;
import com.intellij.ui.SimpleTextAttributes;
import com.intellij.util.ui.UIUtil;
import com.intellij.xdebugger.XDebuggerBundle;
import org.jetbrains.annotations.NonNls;

import javax.swing.*;
import java.awt.*;

/**
 * @author nik
 */
public class XDebuggerUIConstants {
  public static final String COLLECTING_DATA_MESSAGE = XDebuggerBundle.message("xdebugger.building.tree.node.message");
  public static final String EVALUATING_EXPRESSION_MESSAGE = XDebuggerBundle.message("xdebugger.evaluating.expression.node.message");
  public static final String MODIFYING_VALUE_MESSAGE = XDebuggerBundle.message("xdebugger.modifiyng.value.node.message");

  public static final Icon ERROR_MESSAGE_ICON = AllIcons.General.Error;
  public static final Icon INFORMATION_MESSAGE_ICON = AllIcons.General.Information;

  public static final SimpleTextAttributes COLLECTING_DATA_HIGHLIGHT_ATTRIBUTES = get(Color.lightGray, Color.lightGray);
  public static final SimpleTextAttributes EVALUATING_EXPRESSION_HIGHLIGHT_ATTRIBUTES = get(Color.lightGray, Color.lightGray);
  public static final SimpleTextAttributes MODIFYING_VALUE_HIGHLIGHT_ATTRIBUTES = get(Color.blue, DarculaColors.BLUE);
  public static final SimpleTextAttributes CHANGED_VALUE_ATTRIBUTES = get(Color.blue, DarculaColors.BLUE);
  public static final SimpleTextAttributes EXCEPTION_ATTRIBUTES = get(Color.red, DarculaColors.RED);
  public static final SimpleTextAttributes VALUE_NAME_ATTRIBUTES = get(new Color(128, 0, 0), DarculaColors.RED.brighter());
  public static final SimpleTextAttributes ERROR_MESSAGE_ATTRIBUTES = get(Color.red, DarculaColors.RED);
  @NonNls public static final String EQ_TEXT = " = ";

  public static final SimpleTextAttributes TYPE_ATTRIBUTES = SimpleTextAttributes.GRAY_ATTRIBUTES;
  public static final String LAYOUT_VIEW_BREAKPOINT_CONDITION = "breakpoint";

  private static SimpleTextAttributes get(Color defaultColor, Color darkVariant) {
    return new SimpleTextAttributes(Font.PLAIN, UIUtil.isUnderDarcula() ? darkVariant : defaultColor);
  }

  private XDebuggerUIConstants() {
  }
}

@@ -20,10 +20,10 @@
 0-20
-09
+12
  Jet
@@ -709,16 +709,48 @@
 Colors;%0A
+import com.intellij.ui.JBColor;%0A
 import c
@@ -790,44 +790,8 @@
 es;%0A
-import com.intellij.util.ui.UIUtil;%0A
 impo
@@ -1588,32 +1588,44 @@
 TTRIBUTES = get(
+new JBColor(
 Color.lightGray,
@@ -1633,32 +1633,33 @@
 Color.lightGray)
+)
 ;%0A  public stati
@@ -1732,24 +1732,36 @@
 BUTES = get(
+new JBColor(
 Color.lightG
@@ -1781,16 +1781,17 @@
 ghtGray)
+)
 ;%0A  publ
@@ -1862,32 +1862,34 @@
 TTRIBUTES = get(
+JB
 Color.blue, Darc
@@ -1882,36 +1882,16 @@
 lor.blue
-, DarculaColors.BLUE
 );%0A  pub
@@ -1955,24 +1955,26 @@
 BUTES = get(
+JB
 Color.blue, 
@@ -1975,28 +1975,8 @@
 blue
-, DarculaColors.BLUE
 );%0A 
@@ -2036,32 +2036,34 @@
 TTRIBUTES = get(
+JB
 Color.red, Darcu
@@ -2055,35 +2055,16 @@
 olor.red
-, DarculaColors.RED
 );%0A  pub
@@ -2133,16 +2133,28 @@
 get(new 
+JBColor(new 
 Color(12
@@ -2192,16 +2192,17 @@
 ghter())
+)
 ;%0A  publ
@@ -2265,24 +2265,26 @@
 BUTES = get(
+JB
 Color.red, D
@@ -2280,35 +2280,16 @@
 olor.red
-, DarculaColors.RED
 );%0A  @No
@@ -2562,45 +2562,17 @@
 get(
-Color defaultColor, Color darkVariant
+JBColor c
 ) %7B%0A
@@ -2623,60 +2623,9 @@
 IN, 
-UIUtil.isUnderDarcula() ? darkVariant : defaultColor
+c
 );%0A 

use JBColor (cherry-picked from 930dc19)