- Choose Window-->Open Perspective-->Other.
The Select Perspective dialog appears.

- Double-click Plug-in Development.
The Plug-in Development perspective appears.
- Choose File-->New-->Plug-in Project.
The Plug-in Project wizard appears.

- Type a name in the Project Name field.
In this example, type scoreboard.
WARNING: Be sure to start scoreboard with a lowercase letter s.
- Click Next.
The Plug-in Project wizard's second page appears.
- Click Finish to accept the second page's defaults.
The wizard disappears. The workbench's editor area displays the Plug-in Manifest editor. The manifest
editor's Overview page is visible.

The Plug-in Manifest editor gives you a graphical representation of the plugin.xml file's contents. (This
plugin.xml file is a kind of "deployment descriptor" for your new Eclipse plugin.) You can see the plugin.xml
file's text by selecting the editor's plugin.xml tab.

- Select the Extensions tab.
- Click Add.
The New Extension dialog appears.

- Double-click org.eclipse.ui.views.
The New Extension dialog disappears.
- Back in the Extensions tab, right-click the new org.eclipse.ui.views item. Then, in the resulting
context menu, select New-->View.
Eclipse creates a view with default name scoreboard.view1, and shows you the details on the right side of
the editor page.

The plugin.xml file reflects the changes you made.

- On Eclipse's main menu bar, choose File-->Save.
Now it's time to create the plug-in's Java code.
- On the manifest editor's Extensions page, click the
class*: link.
The Java Attribute Editor appears.

- Click Finish to accept the Java Attribute Editor's defaults
Eclipse creates a skeletal version of your new ViewPart1.java file.

- In the viewPart1.java file, replace the
createPartControl method's body with the
following text:
Table table = new Table(parent, SWT.SINGLE);
table.setHeaderVisible(true);
table.setLinesVisible(true);
TableColumn column1 = new TableColumn(table, SWT.LEFT);
TableColumn column2 = new TableColumn(table, SWT.LEFT);
TableItem row1 = new TableItem(table, SWT.NONE);
TableItem row2 = new TableItem(table, SWT.NONE);
column1.setWidth(100);
column1.setText("Home");
column2.setWidth(100);
column2.setText("Visitor");
row1.setText(new String[] { "7", "3" });
row2.setText(new String[] { "5", "11" });
With the addition of this code, your program needs a few more import declarations.
- On the main menu bar, choose Source-->Organize Imports.
The Organize Imports dialog appears.

- In the Organize Imports dialog, double-click org.eclipse.swt.widgets.TableColumn.
- On Eclipse's main menu bar, choose File-->Save All.
Your plug-in is ready to run.
- On the Package Explorer's tree, select the scoreboard project's branch.
- On Eclipse's main menu bar, choose Run-->Run As-->Eclipse Application.
A new version of the Eclipse workbench starts running.
- In the newly opened workbench, choose Window-->Show View-->Other.
The Show View dialog appears.
- In the Show View dialog's tree, expand the Other branch. Then double-click scoreboard.view1.
Your new view appears in the workbench's lower right area.
