diff --git a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/evaluate/quick/XQuickEvaluateHandler.java b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/evaluate/quick/XQuickEvaluateHandler.java index b392438d208f..ce220e904700 100644 --- a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/evaluate/quick/XQuickEvaluateHandler.java +++ b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/evaluate/quick/XQuickEvaluateHandler.java @@ -82,7 +82,7 @@ public class XQuickEvaluateHandler extends QuickEvaluateHandler { resultPromise.setResult(null); return; } - resultPromise.setResult(new XValueHint(project, editor, point, type, expressionInfo, evaluator, session)); + resultPromise.setResult(new XValueHint(project, editor, point, type, expressionInfo, evaluator, session, false)); }); return resultPromise; }); diff --git a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/evaluate/quick/XValueHint.java b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/evaluate/quick/XValueHint.java index ba61acf15859..a1f0a73d9c96 100644 --- a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/evaluate/quick/XValueHint.java +++ b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/evaluate/quick/XValueHint.java @@ -78,6 +78,7 @@ public class XValueHint extends AbstractValueHint { private final XDebuggerEvaluator myEvaluator; private final XDebugSession myDebugSession; + private final boolean myFromKeyboard; private final String myExpression; private final String myValueName; private final @Nullable XSourcePosition myExpressionPosition; @@ -88,11 +89,12 @@ public class XValueHint extends AbstractValueHint { public XValueHint(@NotNull Project project, @NotNull Editor editor, @NotNull Point point, @NotNull ValueHintType type, @NotNull ExpressionInfo expressionInfo, @NotNull XDebuggerEvaluator evaluator, - @NotNull XDebugSession session) { + @NotNull XDebugSession session, boolean fromKeyboard) { super(project, editor, point, type, expressionInfo.getTextRange()); myEvaluator = evaluator; myDebugSession = session; + myFromKeyboard = fromKeyboard; myExpression = XDebuggerEvaluateActionHandler.getExpressionText(expressionInfo, editor.getDocument()); myValueName = XDebuggerEvaluateActionHandler.getDisplayText(expressionInfo, editor.getDocument()); myExpressionInfo = expressionInfo; @@ -126,7 +128,8 @@ public class XValueHint extends AbstractValueHint { public void actionPerformed(@NotNull AnActionEvent e) { hideHint(); final Point point = new Point(myPoint.x, myPoint.y + getEditor().getLineHeight()); - new XValueHint(getProject(), getEditor(), point, ValueHintType.MOUSE_CLICK_HINT, myExpressionInfo, myEvaluator, myDebugSession).invokeHint(); + new XValueHint(getProject(), getEditor(), point, ValueHintType.MOUSE_CLICK_HINT, myExpressionInfo, myEvaluator, myDebugSession, + true).invokeHint(); } }.registerCustomShortcutSet(shortcut, getEditor().getContentComponent(), myDisposable); } @@ -208,7 +211,7 @@ public class XValueHint extends AbstractValueHint { } } else { - if (getType() == ValueHintType.MOUSE_OVER_HINT) { + if (getType() == ValueHintType.MOUSE_OVER_HINT && myFromKeyboard) { text.insert(0, "(" + KeymapUtil.getFirstKeyboardShortcutText("ShowErrorDescription") + ") ", SimpleTextAttributes.GRAYED_ATTRIBUTES); } diff --git a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/frame/XVariablesViewBase.java b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/frame/XVariablesViewBase.java index 6f7606561ee7..2474d73f95b3 100644 --- a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/frame/XVariablesViewBase.java +++ b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/frame/XVariablesViewBase.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2016 JetBrains s.r.o. + * Copyright 2000-2017 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. @@ -193,7 +193,7 @@ public abstract class XVariablesViewBase extends XDebugView { int offset = range.getStartOffset(); LogicalPosition pos = myEditor.offsetToLogicalPosition(offset); Point point = myEditor.logicalPositionToXY(pos); - new XValueHint(myProject, myEditor, point, ValueHintType.MOUSE_OVER_HINT, info, evaluator, session).invokeHint(); + new XValueHint(myProject, myEditor, point, ValueHintType.MOUSE_OVER_HINT, info, evaluator, session, true).invokeHint(); } } }