[HOWTO] Ignore Action text underscore mnemonic marker

The actions where text contains the underscore character, the presentation is interpreting the underscore as mnemonic marker (e.g "Some_Action" results in "Some Action").
One way to avoid this without needing to implemente the update() method was to duplicate the underscore character (e.g. "SOME__ACTION" is presented as "SOME_ACTION"). But this is not possible with the newest Intellij 15 EAPs. I specially needed this "feature" to create database object selection actions (i.e. "DATABASE_OBJECT_NAME" may contain underscores). Is there a way to tell an action to ignore mnemonics in the name?

(I know i could implement the update() method and call Presentation.setText("text", false), but this is quite some effort now)

3 comments
Comment actions Permalink

The only way to avoid this interpretation '_' as mnemonic marker is method you've mentioned, setText("text", false). There was a bug with this method as well but I've got rid of it recently.

0
Comment actions Permalink

Thanks! Have changed my action template presentations with setText("name", false). The double underscore approach was anyways not a safe one.
Have seen the other issue with propagating the mnemonic flag when cloning template presentation. But this seems to be fixed now.

0
Comment actions Permalink

Exactly right, I came across this "clone issue" a week ago and fixed it.

0

Please sign in to leave a comment.