From 28c0fa66b8b4b7acf7e06efc09738730af7ba1e0 Mon Sep 17 00:00:00 2001 From: Yuriy Artamonov Date: Tue, 19 May 2020 20:40:16 +0300 Subject: [PATCH] TestFramework: do not generate descr="null" for GitOrigin-RevId: 762bf12c836d116fbbf02a868373defe6db96c60 --- .../intellij/testFramework/ExpectedHighlightingData.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/platform/testFramework/src/com/intellij/testFramework/ExpectedHighlightingData.java b/platform/testFramework/src/com/intellij/testFramework/ExpectedHighlightingData.java index c3a9f3031b87..a4093bea6cbf 100644 --- a/platform/testFramework/src/com/intellij/testFramework/ExpectedHighlightingData.java +++ b/platform/testFramework/src/com/intellij/testFramework/ExpectedHighlightingData.java @@ -680,14 +680,14 @@ public class ExpectedHighlightingData { } sb.insert(0, text.substring(info.startOffset, endPos)); - String str = '<' + severity + " "; + String str = '<' + severity; String bundleMsg = composeBundleMsg(info, messageBundles); if (bundleMsg != null) { - str += "bundleMsg=\"" + StringUtil.escapeQuotes(bundleMsg) + '"'; + str += " bundleMsg=\"" + StringUtil.escapeQuotes(bundleMsg) + '"'; } - else { - str += "descr=\"" + StringUtil.escapeQuotes(String.valueOf(info.getDescription())) + '"'; + else if (info.getSeverity() != HighlightInfoType.HIGHLIGHTED_REFERENCE_SEVERITY) { + str += " descr=\"" + StringUtil.escapeQuotes(String.valueOf(info.getDescription())) + '"'; } if (showAttributesKeys) { str += " textAttributesKey=\"" + info.forcedTextAttributesKey + '"';