Override "New..." menu organisation

Hi,

One of the current problems of IntelliJ for me, is the organisation of the New menu. With IDEA, if you enable all plugins and add plugins for others languages (like PHP, Ruby, ...), the menu becomes very long with too many items.

I wan to resolve this problem with a plugin to re-organise elements in the new menu. In a first time, I want to create sub-menu for each languages with more than one file. For exemple, a "Ruby" menu with all ruby' new file actions, a "Devkit" menu with all new file actions related to plugin creation (like Action, ...), same for Java, Python ... in order to clean the "new" menu.

So, is it possible to override the group of an action ? And how ?

Thank you in advance for your answer !

-- Gauthier

2 comments
Comment actions Permalink

You should start with reporting bugs for every case when a JetBrains plugin contributes multiple actions to the New menu. We have a way to avoid that (see New | Java Class), and it should be used by all other plugins as well.

To rearrange actions, use DefaultActionGroup.add() and DefaultActionGroup.remove().

0
Comment actions Permalink

Hi,

In this case, I don't think that it's a bug. When I talk about multiple ruby' fils, I'm talking about "Run Rails Generators...", "Ruby Class", "Erb File.html", "RSpect Test Template", "Ruby Class Template", "Test-Spec Template", "TestUnit Test Templated,

In the IDE with all plugins enables, PHP, Python and Ruby, in a Rails project, their is 27 items in the new menu ... In an IntelliJ IDEA plugin, there is 33 items... And the number up to 38 if you look in the File | New ... menu. I already did a feature request to select only componments used in the current project (to avoid Java Class in a PHP Project, and vice versa) here : https://youtrack.jetbrains.com/issue/IDEABKL-7062 (and currently, Singleton & JavaFXApplication are still present in the "New" menu, even with the presence of "New | Java Class", where they are also present).

Thank you for your help. Even if I can't resolve my issue linked before, I'll try to simplify the new menu for the moment.

0

Please sign in to leave a comment.