Skip to Main Content
Eclipse Cookbook
book

Eclipse Cookbook

by Steve Holzner
June 2004
Beginner to intermediate content levelBeginner to intermediate
364 pages
7h 38m
English
O'Reilly Media, Inc.
Content preview from Eclipse Cookbook

12.8. Creating a Plug-in Menu from Scratch

Problem

You have a plug-in action set, and you want to create a new menu using it.

Solution

To create a new menu, right-click an action set in the Extensions tab, and select New Menu.

Discussion

We’ll continue the example developed in the previous recipe by adding a new menu to the action set created in that recipe. Right-click Action Set 1 in the Extensions tab, and select New Menu. In the Properties view, set the id property of the new menu to Menu1 and the label property to Menu 1, as shown in Figure 12-19, where the new menu appears under Action Set 1.

A new menu

Figure 12-19. A new menu

We’re going to add a menu separator to this menu as a placeholder that will enable us to add other items to the menu later, grouping menu items together. To create a menu separator, right-click the menu, Menu 1, and select New Separator. Set the separator’s name property to Group1, in the Properties view, as shown in Figure 12-20.

A new menu separator

Figure 12-20. A new menu separator

This creates a new menu and adds it to the action set. Now you’ve got to create some menu items and connect an action to them to make something happen. See the next recipe for details.

See Also

Recipe 12.9 on creating actions; Recipe 12.10 on coding plug-in actions; Chapter 11 and Chapter 12 of Eclipse (O’Reilly). ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Eclipse

Eclipse

Steve Holzner
Official Eclipse 3.0 FAQs

Official Eclipse 3.0 FAQs

John Arthorne, Chris Laffra

Publisher Resources

Supplemental ContentCatalog PageErrata