File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
src/main/kotlin/insight/generation Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ import com.demonwav.mcdev.util.mapFirstNotNull
2828import com.intellij.codeInsight.CodeInsightActionHandler
2929import com.intellij.ide.util.TreeClassChooserFactory
3030import com.intellij.openapi.editor.Editor
31+ import com.intellij.openapi.editor.EditorModificationUtil
3132import com.intellij.openapi.project.Project
3233import com.intellij.psi.PsiClass
3334import com.intellij.psi.PsiFile
@@ -43,6 +44,10 @@ class GenerateEventListenerHandler : CodeInsightActionHandler {
4344 val caretElement = file.findElementAt(editor.caretModel.offset) ? : return
4445 val context = caretElement.context ? : return
4546
47+ if (! EditorModificationUtil .requestWriting(editor)) {
48+ return
49+ }
50+
4651 val chooser = TreeClassChooserFactory .getInstance(project)
4752 .createWithInnerClassesScopeChooser(
4853 RefactoringBundle .message(" choose.destination.class" ),
You can’t perform that action at this time.
0 commit comments