// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.diagnostic;

import com.intellij.icons.AllIcons;
import com.intellij.openapi.wm.StatusBarWidget;
import com.intellij.ui.AnimatedIcon.Blinking;

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

import static com.intellij.util.ui.EmptyIcon.ICON_16;

class IdeErrorsIcon extends JLabel {
  private final boolean myEnableBlink;

  IdeErrorsIcon(boolean enableBlink) {
    myEnableBlink = enableBlink;
    setBorder(StatusBarWidget.WidgetBorder.INSTANCE);
  }

  void setState(MessagePool.State state) {
    Icon myUnreadIcon = !myEnableBlink ? AllIcons.Ide.FatalError : new Blinking(AllIcons.Ide.FatalError);
    if (state != null && state != MessagePool.State.NoErrors) {
      setIcon(state == MessagePool.State.ReadErrors ? AllIcons.Ide.FatalError_read : myUnreadIcon);
      setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
      setToolTipText(DiagnosticBundle.message("error.notification.tooltip"));
    }
    else {
      setIcon(ICON_16);
      setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
      setToolTipText(null);
    }
  }
}
@@ -18,9 +18,9 @@
 -201
-8
+9
  Jet
@@ -324,32 +324,8 @@
 g.*;
-%0Aimport java.awt.Cursor;
 %0A%0Aim
@@ -902,73 +902,8 @@
 n);%0A
-      setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));%0A
     
@@ -1021,76 +1021,8 @@
 6);%0A
-      setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));%0A
     

Remove hand cursor from ErrorsLabel