Adding Menus to NetBeans IDE 4.1

Until a few minutes ago, I thought that a shortcut to an Ant target can only be added as a menu item to one of the IDE's default menus, such as "File", or "Build", or "Tools". However, I've just discovered that you can create your own menus, and specify where in the menu bar you want to place them, so that when you create a shortcut, you can add it to your own menu (instead of one of the IDE's default menus).

And there are two ways of doing this. The "official" way is to go to Tools > Options, then IDE Configuration > Look and Feel > Menu Bar. And then right-click the Menu Bar node and choose Add Menu. You can also add submenus, by right-clicking the node of the menu and choosing Add > Menu. (And you can also add separators.) And, when you right-click a node, you can choose Change Order, so that you can reorganize the items within the node. (The "unofficial" way of doing this is to go the IDE's user directory, and then to dev/config/Menu. In this folder, you can add as many menus and menu items as you like, as folders and subfolders, then restart the IDE, so that the IDE can load the new menus.)

Once I had created a new menu called "External Servers", with the submenus "JBoss" and "Tomcat 4", I right-clicked my IDE-wide targets (for running and stopping JBoss and Tomcat 4, as well as one for testing JBoss) in the Projects window, and added them to my new menus. This is how it looks in the Options window:

And this is what my cool new menu items look like in the IDE:


Post a Comment:
  • HTML Syntax: NOT allowed

Geertjan Wielenga (@geertjanw) is a Principal Product Manager in the Oracle Developer Tools group living & working in Amsterdam. He is a Java technology enthusiast, evangelist, trainer, speaker, and writer. He blogs here daily.

The focus of this blog is mostly on NetBeans (a development tool primarily for Java programmers), with an occasional reference to NetBeans, and sometimes diverging to topics relating to NetBeans. And then there are days when NetBeans is mentioned, just for a change.


« May 2016