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.1. Creating a Plug-in That Supports Wizards and Editors

Problem

You want to create a plug-in that uses a wizard to create files and an editor to edit them.

Solution

Use a PDE Wizard template. Create a new plug-in project, select the “Plug-in with a multi-page editor” template, and follow the onscreen directions to create a skeletal template, ready to be customized.

Discussion

In this example, we’re going to create a plug-in that Eclipse will associate with the file extension .new. The plug-in’s wizard will enable the user to create files with this extension, and when the user double-clicks those files, they’ll appear in the plug-in’s editor.

The PDE can help us out here by creating a template for our plug-in. Select New Project. In the New Project dialog, select Plug-in Development in the left box and Plug-in Project in the right box, and click Next. Specify the name of the project as org.cookbook.ch13.EditorPlugIn in the following dialog, as shown in Figure 13-1.

Naming the plug-in

Figure 13-1. Naming the plug-in

Click Next once again to bring up the Plug-in Code Generators dialog shown in Figure 13-2. Select the “Plug-in with a multi-page editor” template, as shown in the figure, and click Next.

Creating a plug-in with a multipage editor

Figure 13-2. Creating a plug-in with a multipage editor

In the next dialog, give the provider name as Eclipse ...

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