Add internal action for reporting exceptions from Kotlin plugin

This commit is contained in:
Nikolay Krasko
2019-03-01 16:24:11 +03:00
parent 6504cb285b
commit a5434d7d9e
2 changed files with 18 additions and 0 deletions
@@ -136,6 +136,9 @@
<action id="StoredExceptionsThrowToggleAction" class="org.jetbrains.kotlin.idea.actions.internal.StoredExceptionsThrowToggleAction"
text="Throw cached PCE"/>
<action id="KotlinThrowException" class="org.jetbrains.kotlin.idea.actions.internal.KotlinThrowExceptionAction"
text="Throw Kotlin Plugin Exception"/>
<action id="CopyAsDiagnosticTest" class="org.jetbrains.kotlin.idea.actions.internal.CopyAsDiagnosticTestAction"
text="Copy Current File As Diagnostic Test"/>
@@ -0,0 +1,15 @@
/*
* Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.idea.actions.internal
import com.intellij.openapi.actionSystem.AnAction
import com.intellij.openapi.actionSystem.AnActionEvent
class KotlinThrowExceptionAction : AnAction() {
override fun actionPerformed(e: AnActionEvent) {
throw IllegalStateException("Kotlin Test Exception")
}
}