mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-10 18:40:15 +08:00
Fix MiraiConsoleErrors
This commit is contained in:
parent
fb0b54f42e
commit
233ff9bee3
@ -14,45 +14,44 @@ import org.jetbrains.kotlin.diagnostics.DiagnosticFactory1.create
|
|||||||
import org.jetbrains.kotlin.diagnostics.DiagnosticFactory2.create
|
import org.jetbrains.kotlin.diagnostics.DiagnosticFactory2.create
|
||||||
import org.jetbrains.kotlin.diagnostics.Errors
|
import org.jetbrains.kotlin.diagnostics.Errors
|
||||||
import org.jetbrains.kotlin.diagnostics.Severity.ERROR
|
import org.jetbrains.kotlin.diagnostics.Severity.ERROR
|
||||||
|
import org.jetbrains.kotlin.psi.KtCallExpression
|
||||||
import org.jetbrains.kotlin.psi.KtNamedDeclaration
|
import org.jetbrains.kotlin.psi.KtNamedDeclaration
|
||||||
|
|
||||||
object MiraiConsoleErrors {
|
object MiraiConsoleErrors {
|
||||||
@JvmStatic
|
@JvmField
|
||||||
val ILLEGAL_PLUGIN_DESCRIPTION = create<PsiElement, String>(ERROR)
|
val ILLEGAL_PLUGIN_DESCRIPTION = create<PsiElement, String>(ERROR)
|
||||||
|
|
||||||
@JvmStatic
|
@JvmField
|
||||||
val NOT_CONSTRUCTABLE_TYPE = create<PsiElement, String>(ERROR)
|
val NOT_CONSTRUCTABLE_TYPE = create<PsiElement, KtCallExpression, String>(ERROR)
|
||||||
|
|
||||||
@JvmStatic
|
@JvmField
|
||||||
val UNSERIALIZABLE_TYPE = create<PsiElement, ClassDescriptor>(ERROR)
|
val UNSERIALIZABLE_TYPE = create<PsiElement, ClassDescriptor>(ERROR)
|
||||||
|
|
||||||
@JvmStatic
|
@JvmField
|
||||||
val ILLEGAL_COMMAND_NAME = create<PsiElement, String, String>(ERROR)
|
val ILLEGAL_COMMAND_NAME = create<PsiElement, String, String>(ERROR)
|
||||||
|
|
||||||
@JvmStatic
|
@JvmField
|
||||||
val ILLEGAL_PERMISSION_NAME = create<PsiElement, String, String>(ERROR)
|
val ILLEGAL_PERMISSION_NAME = create<PsiElement, String, String>(ERROR)
|
||||||
|
|
||||||
@JvmStatic
|
@JvmField
|
||||||
val ILLEGAL_PERMISSION_ID = create<PsiElement, String, String>(ERROR)
|
val ILLEGAL_PERMISSION_ID = create<PsiElement, String, String>(ERROR)
|
||||||
|
|
||||||
@JvmStatic
|
@JvmField
|
||||||
val ILLEGAL_PERMISSION_NAMESPACE = create<PsiElement, String, String>(ERROR)
|
val ILLEGAL_PERMISSION_NAMESPACE = create<PsiElement, String, String>(ERROR)
|
||||||
|
|
||||||
@JvmStatic
|
@JvmField
|
||||||
val ILLEGAL_COMMAND_REGISTER_USE = create<PsiElement, KtNamedDeclaration, String>(ERROR)
|
val ILLEGAL_COMMAND_REGISTER_USE = create<PsiElement, KtNamedDeclaration, String>(ERROR)
|
||||||
|
|
||||||
@JvmStatic
|
@JvmField
|
||||||
val ILLEGAL_PERMISSION_REGISTER_USE = create<PsiElement, KtNamedDeclaration, String>(ERROR)
|
val ILLEGAL_PERMISSION_REGISTER_USE = create<PsiElement, KtNamedDeclaration, String>(ERROR)
|
||||||
|
|
||||||
@Suppress("ObjectPropertyName", "unused")
|
@Suppress("ObjectPropertyName", "unused")
|
||||||
@JvmStatic
|
@JvmField
|
||||||
@Deprecated("", level = DeprecationLevel.ERROR)
|
@Deprecated("", level = DeprecationLevel.ERROR)
|
||||||
val _init: Any = object : Any() {
|
val _init: Any = run {
|
||||||
init {
|
Errors.Initializer.initializeFactoryNamesAndDefaultErrorMessages(
|
||||||
Errors.Initializer.initializeFactoryNamesAndDefaultErrorMessages(
|
MiraiConsoleErrors::class.java,
|
||||||
MiraiConsoleErrors::class.java,
|
MiraiConsoleErrorsRendering
|
||||||
MiraiConsoleErrorsRendering
|
)
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user