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.
Follow these steps to create a new plug-in:
Configure your project’s basic settings, in particular its name, and click Next.
Configure the project’s properties as you see fit and click Next.
Select the Layout Algorithm project template. This will cause your project to be initialized with all the necessary files for a simple layout algorithm.
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.
The Package Explorer now shows a new project for your plug-in.
The wizard creates the following things for your:
MANIFEST.MF file with the necessary dependencies to the Eclipse Layout Kernel so you can use our data structures.
plugin.xml file which registers your new layout algorithm with ELK so it can be used.
.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).