Code editing in modal window
Hi,
I'm trying to make my plugin have similar behaviour to 'Toggle case'. Everything seems to work fine, I can edit text in every kind of file, however when I'm trying to edit text in modal window (after hitting SHIFT+F6 for refactoring) it doesn't work - my actionPerformed() method isn't invoked.
I tried to extend TextComponentEditorAction class, but it didn't help. 'Toggle case' works in such modal window. Any suggestions?
Please sign in to leave a comment.
Didn't check thoroughly enough, it works when extending TextComponentEditorAction. You just need to write your own Handler that extends EditorWriteActionHandler.
Hello Michal,
For any action that needs to work in a modal dialog, the isEnabledInModalContext()
method needs to be overridden and to return true.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"