Renaming Registered Action possible?

Answered

Hi,

is it possible to "rename" an already registered Action programmatically? For example, the About action that displays the About Dialog: can I change its name so that it is displayed as "Info" in the Help menu? (my actual use-case is "renaming" some actions of JetBrains MPS).

I could imagine that localization of IntelliJ might be relevant for this, but don't have an idea how localization is solved in IntelliJ, yet.

Cheers,

Till

2 comments

If the action text isn't changed in it's `update` method, you can achieve this by invoking `ActionManager.getInstance().getAction(actionId).getTemplatePresentation().setText(...)`.

0

Thanks, works fine for my Actions!

0

Please sign in to leave a comment.