Image Viewer Plug-in Sample

The image viewer plug-ins, curiously enough, displays an image derived from the current selection in the Eclipse workbench. The image below shows the image viewer in action.

In this example, the contents of the image file selected in the Package Explorer is displayed. The plug-in is designed to be to display images for arbitrary selections. In fact, the image viewer is actually two plug-ins. The base plug-in, org.eclipse.images.viewer, provides the view and the basic infrastructure required to display the image. The other plug-in, org.eclipse.images.viewer.files, contains code that provides an image for a selected file. Other types of selected objects can contribute images by providing their additional plug-ins similar to this one.

Installation

If you want to get the plug-ins to use, you can access them by pointing the Update Manager at the update site: http://www.eclipse.org/evangelism/samples/updates. Once you've installed it, you can open it through the "Window > Show View > Other..." menu item.

Or, you can download the installable feature here: imageviewer-v1.0.1.zip. Install by copying the contents of this zip file into your Eclipse directory.

Getting the Source Code

The source code (as projects) is here: imageviewer-src-v1.0.1.zip.

The source code is also available through the Eclipse CVS server which you can access using the Team Project Set found here. This Team Project Set contains the information required by Eclipse to install the collection of projects that make up the image viewer.

You must download this file and store it locally. The easiest way to do this is to right click on the link above (or here), and select "Save Link As..." from the menu. Save the file where you can easily find it (like on the desktop for example). Once you use this file to import the projects, you can discard it.

You must then import the Team Project Set into your workspace. Do this by selecting "Import..." from the "File" menu; on the first page of the wizard, select "Team Project Set" (under the "Team" category).

On the next page of the wizard, enter the path to the downloaded file and click "Finish".

If you are prompted for a user id and password, enter "anonymous" for the user id and leave the password field blank.