Creating a New Project

Layout algorithms are developed as Eclipse Plug-in Projects. Let’s work through creating a new project using our wizard and what that project consists of.

Creating a New Project

Follow these steps to create a new plug-in:

  1. From the File menu, select New - Project….
  2. From the Plug-in Development category, select Plug-in Project and click Next.
  3. Configure your project’s basic settings, in particular its name, and click Next.

    Step 1 of the New Plug-In Project Wizard.

  4. Configure the project’s properties as you see fit and click Next.

    Step 2 of the New Plug-In Project Wizard.

  5. Select the Layout Algorithm project template. This will cause your project to be initialized with all the necessary files for a simple layout algorithm.

    Step 3 of the New Plug-In Project Wizard.

  6. The template requires a name for your layout algorithm. This will usually derive from your project’s name. Click Finish once you have settled on a name.

    Step 4 of the New Plug-In Project Wizard.

The Package Explorer now shows a new project for your plug-in.

The new project in all its glory.

The Components of Your New Project

The wizard creates the following things for your:

  • A MANIFEST.MF file with the necessary dependencies to the Eclipse Layout Kernel so you can use our data structures.

  • A plugin.xml file which registers your new layout algorithm with ELK so it can be used.

  • A .melk file which describes your layout algorithm and the options it supports (see this page for more information).

  • A sample implementation with a simple basic layout provider. Studying this implementation will teach you a lot about how to develop layout algorithms with ELK (see this page for more information).