main.seskar.compiler.props.diagnostic.PropsErrors.kt Maven / Gradle / Ivy
package seskar.compiler.props.diagnostic
import org.jetbrains.kotlin.diagnostics.DiagnosticFactory0
import org.jetbrains.kotlin.diagnostics.Errors
import org.jetbrains.kotlin.diagnostics.Severity.ERROR
import org.jetbrains.kotlin.psi.KtClassOrObject
import org.jetbrains.kotlin.psi.KtElement
import kotlin.reflect.KClass
private fun errorDiagnosticFactory(): DiagnosticFactory0 =
DiagnosticFactory0.create(ERROR)
private fun initialize(klass: KClass<*>) {
Errors.Initializer.initializeFactoryNamesAndDefaultErrorMessages(klass.java, PropsMessagesExtension)
}
internal object PropsErrors {
@JvmField
val NON_EXTERNAL_PROPS: DiagnosticFactory0 =
errorDiagnosticFactory()
init {
initialize(PropsErrors::class)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy