mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
don't show information tooltip: other implementation (IDEA-CR-18014)
This commit is contained in:
@@ -18,7 +18,6 @@ package com.intellij.codeInsight.daemon.impl;
|
||||
|
||||
import com.intellij.codeInsight.hint.TooltipController;
|
||||
import com.intellij.codeInsight.hint.TooltipGroup;
|
||||
import com.intellij.lang.annotation.HighlightSeverity;
|
||||
import com.intellij.openapi.editor.Editor;
|
||||
import com.intellij.ui.HintHint;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -46,7 +45,6 @@ public class DaemonTooltipUtil {
|
||||
|
||||
public static void showInfoTooltip(@NotNull final HighlightInfo info, @NotNull Editor editor, final int defaultOffset, final int currentWidth, final boolean requestFocus) {
|
||||
if (info.getToolTip() == null) return;
|
||||
if (HighlightSeverity.INFORMATION.equals(info.getSeverity())) return;
|
||||
Rectangle visibleArea = editor.getScrollingModel().getVisibleArea();
|
||||
|
||||
Point bestPoint = editor.logicalPositionToXY(editor.offsetToLogicalPosition(defaultOffset));
|
||||
|
||||
+11
-2
@@ -355,13 +355,22 @@ public class LocalInspectionsPass extends ProgressableTextEditorHighlightingPass
|
||||
.range(psiElement, textRange.getStartOffset(), textRange.getEndOffset())
|
||||
.description(message)
|
||||
.severity(severity);
|
||||
if (toolTip != null) b.escapedToolTip(toolTip);
|
||||
boolean invisible = HighlightSeverity.INFORMATION.equals(severity);
|
||||
if (toolTip != null && !invisible) b.escapedToolTip(toolTip);
|
||||
if (attributes != null) b.textAttributes(attributes);
|
||||
if (problemDescriptor.isAfterEndOfLine()) b.endOfLine();
|
||||
if (isFileLevel) b.fileLevelAnnotation();
|
||||
if (problemDescriptor.getProblemGroup() != null) b.problemGroup(problemDescriptor.getProblemGroup());
|
||||
if (!invisible) return b.create();
|
||||
|
||||
return b.create();
|
||||
HighlightInfo info = b.createUnconditionally();
|
||||
for (HighlightInfoFilter filter : HighlightInfoFilter.EXTENSION_POINT_NAME.getExtensions()) {
|
||||
if (!(filter instanceof HighlightInfoFilterImpl) && !filter.accept(info, myFile)) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
info.psiElement = psiElement;
|
||||
return info;
|
||||
}
|
||||
|
||||
private final Map<TextRange, RangeMarker> ranges2markersCache = new THashMap<>();
|
||||
|
||||
Reference in New Issue
Block a user