<!doctype html public "-//w3c//dtd html 4.0 transitional//en"> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> | |
<meta name="Author" content="home"> | |
<meta name="GENERATOR" content="Mozilla/4.5 [en] (WinNT; U) [Netscape]"> | |
<title>Update Example</title> | |
</head> | |
<body> | |
<h1> | |
Eclipse Update Example</h1> | |
This example illustrates the structure required on an HTTP server for downloading | |
Eclipse components. The example consists of a simple plugin that adds a | |
menu and an action to the workbench. The plug-in has been packaged as a | |
component jar using the Plug-in Development tools in the Eclipse workbench | |
(PDE). Note, that the base plug-in directory for <tt>org.eclipse.update.examples</tt> | |
does not contain the <tt>plugin.xml</tt> file. Consequently the base plugin | |
does not contribute anything to the workbench. The base plugin contains | |
an <tt>install</tt> directory that is used in the following steps. | |
<h3> | |
Running the example</h3> | |
To run the example, you'll need to have an HTTP server available (eg. Apache | |
server). Copy the entire <b><tt>install</tt></b> directory from the example | |
plug-in into the HTTP server document tree (eg. <tt>htdocs</tt> directory | |
for Apache server). Make sure the server is running. | |
<p>Start the Eclipse workbench. Select <b>Help</b>, then <b>Software Updates</b>, | |
then <b>Add...</b> | |
<br>On the location page enter the URL of your server (eg. http://my.server/ | |
... fill in your actual server URL here). The URL needs to reflect | |
any additional server path elements leading to the <tt>install</tt> directory | |
you copied. For example, if you copied the <tt>install</tt> directory into | |
htdocs/examples (so the path is htdocs/examples/install), you would enter | |
the URL as http://my.server/examples. | |
<br>Press <b>Add</b> and <b>Next></b>. You should be presented with a list | |
containing installable components. The provided example contains a single | |
component called <b>Update Example</b>. Select it and complete the installation.You'll | |
need to restart the workbench to activate the changes. | |
<p>Once restarted, you'll be able to add the example action set to your | |
perspectives. Select <b>Perspective</b>, <b>Customize...</b> and then expand | |
<b>Other</b>. | |
Select <b>Sample Action Set</b> (this is an action set implemented by this | |
example plug-in that you just downloaded and installed). A new menu labeled | |
Sample Menu should appear in the workbench with a new action. The new component | |
and its plug-in is now installed and activated. | |
<h3> | |
Examining the <tt>install</tt> directory</h3> | |
The install directory is the output of building a component jar using the | |
PDE Component Project setup (with one extra file added). It contains the | |
following: | |
<p><tt>install/</tt> | |
<br><tt> components/</tt> | |
<br><tt> install.index</tt> | |
<br><tt> org.eclipse.update.examples.component_1.0.0/</tt> | |
<br><tt> | |
install.xml</tt> | |
<br><tt> | |
orq.eclipse.update.examples.component_1.0.0.jar</tt> | |
<p>The above directory structure is required to exist on the server. There | |
is a common <tt>install</tt> root. There is also a common <tt>components</tt> | |
subdirectory. It contains a subdirectory for each component available for | |
download (in the example case just one, <tt>org.eclipse.update.examples.component_1.0.0</tt>). | |
The file <tt>install.index</tt> was manually created (not generated by | |
PDE). It is a simple directory index of component directories (one line | |
per directory). This allows the update client to discover which component | |
directories actually exist on the server. | |
<p>The actual component as created by PDE is contained in the <tt>orq.eclipse.update.examples.component_1.0.0.jar. | |
</tt>Its <tt>install.xml</tt> file that describes the component is also | |
exposed to allow the update support to find out about the component without | |
the need to actually download the jar. | |
<p>Please refer to PDE documentation for details of creating component | |
jars. Select <b>Help</b>, then <b>Help Contents</b> and <b>PDE ISV Guide</b> | |
(from the drop box). | |
<p><a href="hglegal.htm"><img SRC="ngibmcpy.gif" ALT="Copyright IBM Corp. 2000, 2001." BORDER=0 height=12 width=195></a> | |
</body> | |
</html> |