[CMI] Add ability to replace render configuration of DiagnosticCodeMetaInfo
This commit is contained in:
+8
-1
@@ -12,7 +12,7 @@ import org.jetbrains.kotlin.diagnostics.Diagnostic
|
|||||||
class DiagnosticCodeMetaInfo(
|
class DiagnosticCodeMetaInfo(
|
||||||
override val start: Int,
|
override val start: Int,
|
||||||
override val end: Int,
|
override val end: Int,
|
||||||
override val renderConfiguration: DiagnosticCodeMetaInfoRenderConfiguration,
|
renderConfiguration: DiagnosticCodeMetaInfoRenderConfiguration,
|
||||||
val diagnostic: Diagnostic
|
val diagnostic: Diagnostic
|
||||||
) : CodeMetaInfo {
|
) : CodeMetaInfo {
|
||||||
constructor(
|
constructor(
|
||||||
@@ -21,6 +21,13 @@ class DiagnosticCodeMetaInfo(
|
|||||||
diagnostic: Diagnostic
|
diagnostic: Diagnostic
|
||||||
) : this(range.startOffset, range.endOffset, renderConfiguration, diagnostic)
|
) : this(range.startOffset, range.endOffset, renderConfiguration, diagnostic)
|
||||||
|
|
||||||
|
override var renderConfiguration: DiagnosticCodeMetaInfoRenderConfiguration = renderConfiguration
|
||||||
|
private set
|
||||||
|
|
||||||
|
fun replaceRenderConfiguration(renderConfiguration: DiagnosticCodeMetaInfoRenderConfiguration) {
|
||||||
|
this.renderConfiguration = renderConfiguration
|
||||||
|
}
|
||||||
|
|
||||||
override val tag: String
|
override val tag: String
|
||||||
get() = renderConfiguration.getTag(this)
|
get() = renderConfiguration.getTag(this)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user