Plug-in Development 101: The Fundamentals

Plug-in development in Eclipse is somewhat of an art form. If you're new to the concept of plug-ins, especially in the context of OSGi and Eclipse, it can be quite burdensome learning the myriad tools Eclipse has to help you write plug-ins. The purpose of this article is to help you learn some basic plug-in development skills with some best practices sprinkled in for good measure.

This series of articles is all about developing plug-ins. But before we get started, we need to ensure that we have a proper environment in which to develop plug-ins. The first step is to download an Eclipse distribution that has the Plug-in Development Environment (PDE) in it from Eclipse.org. I recommend downloading the latest version of Eclipse Classic. In this series, we will use a milestone release of Eclipse V3.4 (M5). Once this done, you're ready to go.

To make it easier to understand plug-in development, this article will follow a workflow detailed in Figure 1. In Part 1 of this series, we will focus on the first five steps of the workflow. We will leave the last two steps for Part 2, which will focus on rich-client applications.

Figure 1: Plug-in Development WorkflowFigure 1: Plug-in Development Workflow

Before we dive into the details of plug-in creation, let's discuss what a plug-in exactly is. Technically, a plug-in is a Java™ Archive (JAR) that is self-contained and self-describing. It's self-containing because it houses the code and resources the plug-in needs to run. It's self-describing because it includes information stating what it is, what it requires from the world, and what it contributes to the world. In a plug-in, you will generally see two descriptor files: a MANIFEST.MF and plugin.xml.

Article Type: 
How-to
0
Average: 2.4 (9 votes)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)