From 68816d7a4e9234756f075f1fe5e9ab30cd753051 Mon Sep 17 00:00:00 2001 From: Dennis Ushakov Date: Mon, 4 Apr 2016 13:07:26 +0300 Subject: [PATCH] shorten too long todos #WEB-21117 fixed --- .../codeInsight/daemon/impl/GeneralHighlightingPass.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platform/analysis-impl/src/com/intellij/codeInsight/daemon/impl/GeneralHighlightingPass.java b/platform/analysis-impl/src/com/intellij/codeInsight/daemon/impl/GeneralHighlightingPass.java index c271e27debc1..cc4afae407eb 100644 --- a/platform/analysis-impl/src/com/intellij/codeInsight/daemon/impl/GeneralHighlightingPass.java +++ b/platform/analysis-impl/src/com/intellij/codeInsight/daemon/impl/GeneralHighlightingPass.java @@ -40,6 +40,7 @@ import com.intellij.openapi.project.DumbService; import com.intellij.openapi.project.IndexNotReadyException; import com.intellij.openapi.project.Project; import com.intellij.openapi.util.*; +import com.intellij.openapi.util.text.StringUtil; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.problems.Problem; import com.intellij.problems.WolfTheProblemSolver; @@ -473,7 +474,8 @@ public class GeneralHighlightingPass extends ProgressableTextEditorHighlightingP TextAttributes attributes = todoItem.getPattern().getAttributes().getTextAttributes(); HighlightInfo.Builder builder = HighlightInfo.newHighlightInfo(HighlightInfoType.TODO).range(range); builder.textAttributes(attributes); - builder.descriptionAndTooltip(description); + builder.description(description); + builder.unescapedToolTip(StringUtil.shortenPathWithEllipsis(description, 1024)); HighlightInfo info = builder.createUnconditionally(); (priorityRange.containsRange(info.getStartOffset(), info.getEndOffset()) ? insideResult : outsideResult).add(info); }