| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html lang="en"> |
| <HEAD> |
| |
| <meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2013. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." > |
| |
| <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1"> |
| <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"> |
| |
| <LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css"> |
| <TITLE> |
| The Hello World manifests |
| </TITLE> |
| |
| |
| </HEAD> |
| <BODY BGCOLOR="#ffffff"> |
| <H2>The Hello World manifests</H2> |
| |
| <p>Before we run the new view, let's take a look at the manifest files that were |
| generated for us. First, double-click the plugin.xml file to open the plug-in |
| editor and select the <strong>plugin.xml</strong> tab.</p> |
| <pre><?xml version="1.0" encoding="UTF-8"?> |
| <?eclipse version="3.2"?> |
| <plugin> |
| <extension point="org.eclipse.ui.views"> |
| <category |
| name="Hello Category" |
| id="com.example.helloworld"> |
| </category> |
| <view |
| name="Hello View" |
| icon="icons/sample.gif" |
| category="com.example.helloworld" |
| class="com.example.helloworld.HelloWorldView" |
| id="com.example.helloworld.HelloWorldView"> |
| </view> |
| </extension> |
| </plugin> |
| </pre> |
| <p> |
| The information about the view that we provided when we created the plug-in project was used to generate |
| an entry in the plugin.xml file that defines our view extension. In the extension definition, |
| we define a <b>category</b> for the view, including its <b>name</b> and <b>id</b>. We then define the view |
| itself, including its <b>name</b> and <b>id</b>, and we associate it with the <b>category</b> using the id we |
| defined for our category. We also specify the <b>class</b> that implements our view, <b>HelloWorldView</b>. |
| </p> |
| <p> |
| As you can see, the plug-in manifest file wraps up all the information about our extension and how to run it into |
| a nice, neat package. |
| </p> |
| <p>The other manifest file that is generated by the PDE is the OSGi manifest, MANIFEST.MF. This file is created |
| in the META-INF directory of the plug-in project, but is most easily viewed by clicking on the |
| <strong>MANIFEST.MF</strong> tab of the plug-in editor. The OSGi manifest describes lower-level information |
| about the packaging of the plug-in, using the OSGi bundle terminology. It contains information such as |
| the name of the plug-in (bundle) and the bundles that it requires. |
| </p> |
| |
| |
| </BODY> |
| </HTML> |