mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Replace the new line in the highlight description for StoreHighlightingResultsCommand
GitOrigin-RevId: f911bc18edb4c2b822681f3b023f78db1ed0f718
This commit is contained in:
committed by
intellij-monorepo-bot
parent
26edecf789
commit
9bafb34051
+4
-1
@@ -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")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user