[debugger-rd] IJPL-160146: Remove canShowHint method, since it always returns true

GitOrigin-RevId: 17f11978a2fe84efccde9bb65fafd7e8b70279eb
This commit is contained in:
Nikolay Rykunov
2024-09-16 15:01:46 +02:00
committed by intellij-monorepo-bot
parent d2dfa559f2
commit 211cb58b51
3 changed files with 3 additions and 12 deletions

View File

@@ -44,8 +44,8 @@ private class BackendDebuggerValueLookupHintsRemoteApi : XDebuggerValueLookupHin
val editor = editorId.findEditor() val editor = editorId.findEditor()
val point = editor.offsetToXY(offset) val point = editor.offsetToXY(offset)
val hint = getValueHintFromDebuggers(project, editor, point, hintType) ?: return@withContext false val canShowHint = getValueHintFromDebuggers(project, editor, point, hintType) != null
hint.canShowHint() return@withContext canShowHint
} }
} }

View File

@@ -202,10 +202,6 @@ public class ValueLookupManager implements EditorMouseMotionListener, EditorMous
hint.setEditorMouseEvent(event); hint.setEditorMouseEvent(event);
} }
UIUtil.invokeLaterIfNeeded(() -> { UIUtil.invokeLaterIfNeeded(() -> {
if (!hint.canShowHint()) {
return;
}
hideHint(); hideHint();
myCurrentHint = hint; myCurrentHint = hint;

View File

@@ -100,11 +100,6 @@ public abstract class AbstractValueHint {
myCurrentRange = textRange; myCurrentRange = textRange;
} }
@ApiStatus.Internal
public boolean canShowHint() {
return true;
}
protected abstract void evaluateAndShowHint(); protected abstract void evaluateAndShowHint();
boolean isInsideCurrentRange(Editor editor, Point point) { boolean isInsideCurrentRange(Editor editor, Point point) {
@@ -145,7 +140,7 @@ public abstract class AbstractValueHint {
public void invokeHint(Runnable hideRunnable) { public void invokeHint(Runnable hideRunnable) {
myHideRunnable = hideRunnable; myHideRunnable = hideRunnable;
if (!canShowHint() || !isCurrentRangeValid()) { if (!isCurrentRangeValid()) {
hideHint(); hideHint();
return; return;
} }