Geertjan's Blog

  • April 12, 2005

Adding Menus to NetBeans IDE 4.1

Geertjan Wielenga
Product Manager
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:

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.