# Creating a plug-in project

In the workspace, a plug-in is represented by a single project that has a plugin.xml (manifest) file at its root and that encapsulates all the code and resources of the plug-in.

To create a plug-in project, bring up the New Plug-in Project creation wizard via File > New > Plug-in Project.

It is a convention that plug-in project names are the same as plug-in IDs, but they can be different.

The plug-in project can be created in one of two flavors: a Java project or a simple project. Most plug-ins are meant to contain executable Java code and must therefore be housed in a Java project. On the other hand, if, for example, you are creating a documentation plug-in, then a simple project will suffice.

The 3.0 runtime supports a new plug-in format, where the plug-in content is split between the traditional plugin.xml file and an OSGi bundle manifest file. This new format is NOT required for plug-ins created in 3.0. It is optional and only recommended for advanced users.

On the Plug-in Content page, you set the data with which the plugin.xml file will be initialized, including the plug-id, version and name.

The Plug-in class is a top-level Java class that represents the entire plug-in. It will be used at runtime to control the plug-in's life cycle, i.e. its implementation will determine what happens when the plug-in starts up or shuts down. It can also be used as a central place to create and access the resource bundle that can hold your plug-in's locale-specific objects, such as translatable strings.

The next page shows the various templates that PDE provides which generate useful content such as views, editors, property pages etc.

In this example, we will create a plug-in with the "Hello, World" template. You can read about the wizard in the area to the right of the wizard list. Click Next.

The next page will let you customize the sample extension that we are creating.

When you press Finish, the wizard will create the new project, all the specified folders and files, and the initial Java build path. The build path is important for correct compilation of Java classes that are generated. The wizard will also open the plug-in manifest editor so that you can define additional attributes of your plug-in.

After the wizard is finished, the initial project structure should look like this: