From 7e401bfee5207c0ec798c7858a0b8f0358c5b582 Mon Sep 17 00:00:00 2001 From: Egor Ushakov Date: Fri, 1 Feb 2019 13:04:44 +0300 Subject: [PATCH] EA-135314 - IAE: ColorUtil.$$$reportNull$$$ --- .../xdebugger/impl/XDebuggerManagerImpl.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/XDebuggerManagerImpl.java b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/XDebuggerManagerImpl.java index b23da2013c12..1c8deb6f7d2d 100644 --- a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/XDebuggerManagerImpl.java +++ b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/XDebuggerManagerImpl.java @@ -357,12 +357,6 @@ public class XDebuggerManagerImpl extends XDebuggerManager implements Persistent private class DebuggerEditorListener implements EditorMouseMotionListener, EditorMouseListener { RangeHighlighter myCurrentHighlighter; - final TextAttributes myAttributes; - - DebuggerEditorListener() { - myAttributes = EditorColorsManager.getInstance().getGlobalScheme().getAttributes(DebuggerColors.EXECUTIONPOINT_ATTRIBUTES).clone(); - myAttributes.setBackgroundColor(ColorUtil.softer(myAttributes.getBackgroundColor())); - } boolean isEnabled(@NotNull EditorMouseEvent e) { if (e.getArea() != EditorMouseEventArea.LINE_NUMBERS_AREA) { @@ -379,9 +373,17 @@ public class XDebuggerManagerImpl extends XDebuggerManager implements Persistent return; } removeHighlighter(e); + + TextAttributes attributes = EditorColorsManager.getInstance().getGlobalScheme().getAttributes(DebuggerColors.EXECUTIONPOINT_ATTRIBUTES); + Color backgroundColor = attributes.getBackgroundColor(); + if (backgroundColor != null) { + attributes = attributes.clone(); + attributes.setBackgroundColor(ColorUtil.softer(backgroundColor)); + } + myCurrentHighlighter = e.getEditor().getMarkupModel().addLineHighlighter(getLineNumber(e), DebuggerColors.EXECUTION_LINE_HIGHLIGHTERLAYER, - myAttributes); + attributes); IdeGlassPaneUtil.find(e.getMouseEvent().getComponent()).setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR), this); }