File tree 1 file changed +5
-0
lines changed
src/main/kotlin/insight/generation
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
28
28
import com.intellij.codeInsight.CodeInsightActionHandler
29
29
import com.intellij.ide.util.TreeClassChooserFactory
30
30
import com.intellij.openapi.editor.Editor
31
+ import com.intellij.openapi.editor.EditorModificationUtil
31
32
import com.intellij.openapi.project.Project
32
33
import com.intellij.psi.PsiClass
33
34
import com.intellij.psi.PsiFile
@@ -43,6 +44,10 @@ class GenerateEventListenerHandler : CodeInsightActionHandler {
43
44
val caretElement = file.findElementAt(editor.caretModel.offset) ? : return
44
45
val context = caretElement.context ? : return
45
46
47
+ if (! EditorModificationUtil .requestWriting(editor)) {
48
+ return
49
+ }
50
+
46
51
val chooser = TreeClassChooserFactory .getInstance(project)
47
52
.createWithInnerClassesScopeChooser(
48
53
RefactoringBundle .message(" choose.destination.class" ),
You can’t perform that action at this time.
0 commit comments