Fix org.jetbrains.kotlin.idea.script.ScriptConfigurationHighlightingTestGenerated.Highlighting.testThrowingResolver
This commit is contained in:
+5
-2
@@ -57,12 +57,15 @@ class ScriptExternalHighlightingPass(
|
|||||||
|
|
||||||
val annotations = reports.mapNotNull { scriptDiagnostic ->
|
val annotations = reports.mapNotNull { scriptDiagnostic ->
|
||||||
val (startOffset, endOffset) = scriptDiagnostic.location?.let { computeOffsets(document, it) } ?: 0 to 0
|
val (startOffset, endOffset) = scriptDiagnostic.location?.let { computeOffsets(document, it) } ?: 0 to 0
|
||||||
|
val exception = scriptDiagnostic.exception
|
||||||
|
val exceptionMessage = if (exception != null) " ($exception)" else ""
|
||||||
|
val message = scriptDiagnostic.message + exceptionMessage
|
||||||
val annotation = Annotation(
|
val annotation = Annotation(
|
||||||
startOffset,
|
startOffset,
|
||||||
endOffset,
|
endOffset,
|
||||||
scriptDiagnostic.severity.convertSeverity() ?: return@mapNotNull null,
|
scriptDiagnostic.severity.convertSeverity() ?: return@mapNotNull null,
|
||||||
scriptDiagnostic.message,
|
message,
|
||||||
scriptDiagnostic.message
|
message
|
||||||
)
|
)
|
||||||
|
|
||||||
// if range is empty, show notification panel in editor
|
// if range is empty, show notification panel in editor
|
||||||
|
|||||||
Reference in New Issue
Block a user