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

13.4. Creating a Plug-in That Supports Views

Problem

You need your plug-in to support a view.

Solution

Use the PDE template “Plug-in with a view.”

Discussion

This next example will build a plug-in that supports a view—in this case, a clickable tree of items. To follow along, create a new plug-in project named org.cookbook.ch13.ViewPlugIn. In the Plug-in Code Generators dialog, shown in Figure 13-9, select “Plug-in with a view” and click Next.

Configuring a plug-in with a view

Figure 13-9. Configuring a plug-in with a view

In the next dialog, set the provider name to Eclipse Cookbook, as shown in Figure 13-10.

Setting the provider name

Figure 13-10. Setting the provider name

Clicking Next brings up the Main View Settings dialog shown in Figure 13-11. Here’s where you customize the view, setting its name, as well as a whether it should be a tree-based view or a table-based view. Name the view Item View, and make it a tree-based view, as shown in the figure. Click Next again to bring up the final dialog of this wizard.

Setting view options

Figure 13-11. Setting view options

In the last dialog, you configure the view’s actions. Leave the defaults selected, and click Finish to create the template for this plug-in (see Figure 13-12).

Figure 13-12. Configuring the view’s actions

After ...

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