diff --git a/plugins/performanceTesting/core/src/com/jetbrains/performancePlugin/commands/StoreHighlightingResultsCommand.kt b/plugins/performanceTesting/core/src/com/jetbrains/performancePlugin/commands/StoreHighlightingResultsCommand.kt index ea7634c51483..8472326d8dfe 100644 --- a/plugins/performanceTesting/core/src/com/jetbrains/performancePlugin/commands/StoreHighlightingResultsCommand.kt +++ b/plugins/performanceTesting/core/src/com/jetbrains/performancePlugin/commands/StoreHighlightingResultsCommand.kt @@ -42,12 +42,15 @@ class StoreHighlightingResultsCommand(text: String, line: Int) : PlaybackCommand writeIntentReadAction { val psiFile = PsiDocumentManager.getInstance(project).getPsiFile(editor.document) require(psiFile != null) + + var description: String DaemonCodeAnalyzerImpl.getHighlights(editor.document, null, project).forEach { highlight -> assert(editor.document.textLength > highlight.actualStartOffset) { "Highlight start offset ${editor.document.textLength} less than document text length ${highlight.actualStartOffset}" } + description = if (highlight.description == null) "" else highlight.description.replace("\n", "") fileForStoringHighlights - .appendText("${highlight.severity}☆${highlight.description}☆${editor.document.getLineNumber(highlight.actualStartOffset)}☆${highlight.toolId}" + "\n") + .appendText("${highlight.severity}☆$description☆${editor.document.getLineNumber(highlight.actualStartOffset)}☆${highlight.toolId}" + "\n") } } }