Before you start
This series is for developers interested in building game plug-ins for Eclipse using OpenGL and the Lightweight Java Games Library (LWJGL). Part 4 concludes the series by showing how to build and unit-test the plug-in using an automated process, and how to package it for distribution.
In this four-part series, you will be introduced to the basic techniques, tools, and libraries used to create a full-featured Eclipse plug-in that uses the Standard Widget Toolkit (SWT) and OpenGL libraries for providing graphics. Part 1 looks at building the framework for a simple video game to be launched and played inside Eclipse by creating a plug-in. Part 2 takes the basic framework created in Part 1 and started adding the actual visual elements using OpenGL. Part 3 adds the actual game elements, enabling the user to interact with the graphics created in Part 2. Part 4 takes everything created in the previous three parts and makes sure it all works properly, including packaging and testing the plug-in.
In this tutorial, we take everything developed thus far, test it, and prepare it for distribution. Specifically, we will:
- Create JUnit test cases for unit-testing the plug-in.
- Create an Eclipse feature project to manage packaging of the plug-in.
- Develop an automated build and test process using headless build support provided by the Plug-in Development Environment (PDE).
This tutorial assumes you have basic knowledge of Java syntax and coding; Eclipse plug-in programming, as shown in Part 1 of this series; unit-testing with JUnit; and Apache Ant scripts. Graphics programming knowledge is a plus, but not required. Knowledge of OpenGL is not required.
The following tools are needed to follow along:
- Eclipse
- Eclipse is the framework for creating the plug-in created in Part 1. Now we'll continue leveraging Eclipse in building the gaming plug-in. Download Eclipse SDK 3.2 M3 or later.
- Eclipse SWT
- SWT is the Eclipse widgets package for window making, donated to Eclipse by IBM. Download SWT 3.2 M3 or later.
- Eclipse OpenGL
- You need the OpenGL libraries for creating shapes and more. Download the experimental org.eclipse.opengl binding, version 0.5 for SWT 3.2 for your system.
- Eclipse Example Plug-in using OpenGL
- Download the Example plug-in with a view that uses OpenGL. You'll use the source code in this plug-in as a framework for building your own custom OpenGL scene.
- Java technology
- Eclipse and all its plug-ins need Java technology. Download Java from Sun Microsystems or IBM.
- Eclipse Test Framework
- This package provides support for automated testing of plug-ins. It is available from Eclipse.org as an add-on to the Eclipse SDK.
- Info-ZIP
- This utility is used by the automated build script on platforms that do not have a native zip/unzip command. Download it from Info-ZIP.

